<!doctype html>
<html>
<head>
<meta charset='UTF-8'><meta name='viewport' content='width=device-width initial-scale=1'>

<style type='text/css'>html {overflow-x: initial !important;}:root { --bg-color: #ffffff; --text-color: #333333; --select-text-bg-color: #B5D6FC; --select-text-font-color: auto; --monospace: "Lucida Console",Consolas,"Courier",monospace; --title-bar-height: 20px; }
.mac-os-11 { --title-bar-height: 28px; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5 { white-space: pre-wrap; }
body { margin: 0px; padding: 0px; height: auto; inset: 0px; font-size: 1rem; line-height: 1.42857143; overflow-x: hidden; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit; background-repeat: inherit; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; word-wrap: break-word; position: relative; white-space: normal; overflow-x: visible; padding-top: 36px; }
#write.first-line-indent p { text-indent: 2em; }
#write.first-line-indent li p, #write.first-line-indent p * { text-indent: 0px; }
#write.first-line-indent li { margin-left: 2em; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
.typora-export .footnote-line, .typora-export li, .typora-export p { white-space: pre-wrap; }
.typora-export .task-list-item input { pointer-events: none; }
@media screen and (max-width: 500px) {
  body.typora-export { padding-left: 0px; padding-right: 0px; }
  #write { padding-left: 20px; padding-right: 20px; }
}
#write li > figure:last-child { margin-bottom: 0.5rem; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; image-orientation: from-image; }
button, input, select, textarea { color: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; }
input[type="checkbox"], input[type="radio"] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
p { line-height: inherit; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 4; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.7); color: rgb(85, 85, 85); border-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type="checkbox"] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure > table { margin: 0px; }
thead, tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 32px; }
.CodeMirror-gutters { border-right-width: 0px; background-color: inherit; }
.CodeMirror-linenumber { -webkit-user-select: none; }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; position: relative !important; background-position: inherit; background-repeat: inherit; }
.md-fences-adv-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
svg { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; background-position: 0px 0px; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li blockquote { margin: 1rem 0px; }
li { margin: 0px; position: relative; }
blockquote > :last-child { margin-bottom: 0px; }
blockquote > :first-child, li > :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print {
  body, html { border: 1px solid transparent; height: 99%; break-after: avoid; break-before: avoid; font-variant-ligatures: no-common-ligatures; }
  #write { margin-top: 0px; border-color: transparent !important; padding-top: 0px !important; padding-bottom: 0px !important; }
  .typora-export * { print-color-adjust: exact; }
  .typora-export #write { break-after: avoid; }
  .typora-export #write::after { height: 0px; }
  .is-mac table { break-inside: avoid; }
  #write > p:nth-child(1) { margin-top: 0px; }
  .typora-export-show-outline .typora-export-sidebar { display: none; }
  figure { overflow-x: visible; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background-color: rgb(204, 204, 204); display: block; overflow-x: hidden; }
p > .md-image:only-child:not(.md-img-error) img, p > img:only-child { display: block; margin: auto; }
#write.first-line-indent p > .md-image:only-child:not(.md-img-error) img { left: -2em; position: relative; }
p > .md-image:only-child { display: inline-block; width: 100%; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
.MathJax_ref { fill: currentcolor; }
[contenteditable="true"]:active, [contenteditable="true"]:focus, [contenteditable="false"]:active, [contenteditable="false"]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item > input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); border: none; }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { text-decoration: underline; }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) {
  .md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
  .md-toc-h4 .md-toc-inner { margin-left: 5em; }
  .md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
  .md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.reversefootnote { font-family: ui-monospace, sans-serif; }
.md-attr { display: none; }
.md-fn-count::after { content: "."; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background-color: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.6; font-family: var(--monospace); }
code { text-align: left; }
a.md-print-anchor { white-space: pre !important; border: none !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; text-shadow: initial !important; background-position: 0px 0px !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: "Segoe UI Symbol", sans-serif; }
.md-diagram-panel > svg { max-width: 100%; }
[lang="flow"] svg, [lang="mermaid"] svg { max-width: 100%; height: auto; }
[lang="mermaid"] .node text { font-size: 1rem; }
table tr th { border-bottom-width: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }
mark { background-color: rgb(255, 255, 0); color: rgb(0, 0, 0); }
.md-html-inline .md-plain, .md-html-inline strong, mark .md-inline-math, mark strong { color: inherit; }
.md-expand mark .md-meta { opacity: 0.3 !important; }
mark .md-meta { color: rgb(0, 0, 0); }
@media print {
  .typora-export h1, .typora-export h2, .typora-export h3, .typora-export h4, .typora-export h5, .typora-export h6 { break-inside: avoid; }
}
.md-diagram-panel .messageText { stroke: none !important; }
.md-diagram-panel .start-state { fill: var(--node-fill); }
.md-diagram-panel .edgeLabel rect { opacity: 1 !important; }
.md-fences.md-fences-math { font-size: 1em; }
.md-fences-advanced:not(.md-focus) { padding: 0px; white-space: nowrap; border: 0px; }
.md-fences-advanced:not(.md-focus) { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit; background-repeat: inherit; }
.typora-export-show-outline .typora-export-content { max-width: 1440px; margin: auto; display: flex; flex-direction: row; }
.typora-export-sidebar { width: 300px; font-size: 0.8rem; margin-top: 80px; margin-right: 18px; }
.typora-export-show-outline #write { --webkit-flex: 2; flex: 2 1 0%; }
.typora-export-sidebar .outline-content { position: fixed; top: 0px; max-height: 100%; overflow: hidden auto; padding-bottom: 30px; padding-top: 60px; width: 300px; }
@media screen and (max-width: 1024px) {
  .typora-export-sidebar, .typora-export-sidebar .outline-content { width: 240px; }
}
@media screen and (max-width: 800px) {
  .typora-export-sidebar { display: none; }
}
.outline-content li, .outline-content ul { margin-left: 0px; margin-right: 0px; padding-left: 0px; padding-right: 0px; list-style: none; overflow-wrap: anywhere; }
.outline-content ul { margin-top: 0px; margin-bottom: 0px; }
.outline-content strong { font-weight: 400; }
.outline-expander { width: 1rem; height: 1.428571429rem; position: relative; display: table-cell; vertical-align: middle; cursor: pointer; padding-left: 4px; }
.outline-expander::before { content: ""; position: relative; font-family: Ionicons; display: inline-block; font-size: 8px; vertical-align: middle; }
.outline-item { padding-top: 3px; padding-bottom: 3px; cursor: pointer; }
.outline-expander:hover::before { content: ""; }
.outline-h1 > .outline-item { padding-left: 0px; }
.outline-h2 > .outline-item { padding-left: 1em; }
.outline-h3 > .outline-item { padding-left: 2em; }
.outline-h4 > .outline-item { padding-left: 3em; }
.outline-h5 > .outline-item { padding-left: 4em; }
.outline-h6 > .outline-item { padding-left: 5em; }
.outline-label { cursor: pointer; display: table-cell; vertical-align: middle; text-decoration: none; color: inherit; }
.outline-label:hover { text-decoration: underline; }
.outline-item:hover { border-color: rgb(245, 245, 245); background-color: var(--item-hover-bg-color); }
.outline-item:hover { margin-left: -28px; margin-right: -28px; border-left-width: 28px; border-left-style: solid; border-left-color: transparent; border-right-width: 28px; border-right-style: solid; border-right-color: transparent; }
.outline-item-single .outline-expander::before, .outline-item-single .outline-expander:hover::before { display: none; }
.outline-item-open > .outline-item > .outline-expander::before { content: ""; }
.outline-children { display: none; }
.info-panel-tab-wrapper { display: none; }
.outline-item-open > .outline-children { display: block; }
.typora-export .outline-item { padding-top: 1px; padding-bottom: 1px; }
.typora-export .outline-item:hover { margin-right: -8px; border-right-width: 8px; border-right-style: solid; border-right-color: transparent; }
.typora-export .outline-expander::before { content: "+"; font-family: inherit; top: -1px; }
.typora-export .outline-expander:hover::before, .typora-export .outline-item-open > .outline-item > .outline-expander::before { content: "−"; }
.typora-export-collapse-outline .outline-children { display: none; }
.typora-export-collapse-outline .outline-item-open > .outline-children, .typora-export-no-collapse-outline .outline-children { display: block; }
.typora-export-no-collapse-outline .outline-expander::before { content: "" !important; }
.typora-export-show-outline .outline-item-active > .outline-item .outline-label { font-weight: 700; }
.md-inline-math-container mjx-container { zoom: 0.95; }
mjx-container { break-inside: avoid; }
.md-alert.md-alert-note { border-left-color: rgb(9, 105, 218); }
.md-alert.md-alert-important { border-left-color: rgb(130, 80, 223); }
.md-alert.md-alert-warning { border-left-color: rgb(154, 103, 0); }
.md-alert.md-alert-tip { border-left-color: rgb(31, 136, 61); }
.md-alert.md-alert-caution { border-left-color: rgb(207, 34, 46); }
.md-alert { padding: 0px 1em; margin-bottom: 16px; color: inherit; border-left-width: 0.25em; border-left-style: solid; border-left-color: rgb(0, 0, 0); }
.md-alert-text-note { color: rgb(9, 105, 218); }
.md-alert-text-important { color: rgb(130, 80, 223); }
.md-alert-text-warning { color: rgb(154, 103, 0); }
.md-alert-text-tip { color: rgb(31, 136, 61); }
.md-alert-text-caution { color: rgb(207, 34, 46); }
.md-alert-text { font-size: 0.9rem; font-weight: 700; }
.md-alert-text svg { fill: currentcolor; position: relative; top: 0.125em; margin-right: 1ch; overflow: visible; }
.md-alert-text-container::after { content: attr(data-text); text-transform: capitalize; pointer-events: none; margin-right: 1ch; }


.CodeMirror { height: auto; }
.CodeMirror.cm-s-inner { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit; background-repeat: inherit; }
.CodeMirror-scroll { overflow: auto hidden; z-index: 3; }
.CodeMirror-gutter-filler, .CodeMirror-scrollbar-filler { background-color: rgb(255, 255, 255); }
.CodeMirror-gutters { border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; white-space: nowrap; background-position: inherit; background-repeat: inherit; }
.CodeMirror-linenumber { padding: 0px 3px 0px 5px; text-align: right; color: rgb(153, 153, 153); }
.cm-s-inner .cm-keyword { color: rgb(119, 0, 136); }
.cm-s-inner .cm-atom, .cm-s-inner.cm-atom { color: rgb(34, 17, 153); }
.cm-s-inner .cm-number { color: rgb(17, 102, 68); }
.cm-s-inner .cm-def { color: rgb(0, 0, 255); }
.cm-s-inner .cm-variable { color: rgb(0, 0, 0); }
.cm-s-inner .cm-variable-2 { color: rgb(0, 85, 170); }
.cm-s-inner .cm-variable-3 { color: rgb(0, 136, 85); }
.cm-s-inner .cm-string { color: rgb(170, 17, 17); }
.cm-s-inner .cm-property { color: rgb(0, 0, 0); }
.cm-s-inner .cm-operator { color: rgb(152, 26, 26); }
.cm-s-inner .cm-comment, .cm-s-inner.cm-comment { color: rgb(170, 85, 0); }
.cm-s-inner .cm-string-2 { color: rgb(255, 85, 0); }
.cm-s-inner .cm-meta { color: rgb(85, 85, 85); }
.cm-s-inner .cm-qualifier { color: rgb(85, 85, 85); }
.cm-s-inner .cm-builtin { color: rgb(51, 0, 170); }
.cm-s-inner .cm-bracket { color: rgb(153, 153, 119); }
.cm-s-inner .cm-tag { color: rgb(17, 119, 0); }
.cm-s-inner .cm-attribute { color: rgb(0, 0, 204); }
.cm-s-inner .cm-header, .cm-s-inner.cm-header { color: rgb(0, 0, 255); }
.cm-s-inner .cm-quote, .cm-s-inner.cm-quote { color: rgb(0, 153, 0); }
.cm-s-inner .cm-hr, .cm-s-inner.cm-hr { color: rgb(153, 153, 153); }
.cm-s-inner .cm-link, .cm-s-inner.cm-link { color: rgb(0, 0, 204); }
.cm-negative { color: rgb(221, 68, 68); }
.cm-positive { color: rgb(34, 153, 34); }
.cm-header, .cm-strong { font-weight: 700; }
.cm-del { text-decoration: line-through; }
.cm-em { font-style: italic; }
.cm-link { text-decoration: underline; }
.cm-error { color: red; }
.cm-invalidchar { color: red; }
.cm-constant { color: rgb(38, 139, 210); }
.cm-defined { color: rgb(181, 137, 0); }
div.CodeMirror span.CodeMirror-matchingbracket { color: rgb(0, 255, 0); }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: rgb(255, 34, 34); }
.cm-s-inner .CodeMirror-activeline-background { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit; background-repeat: inherit; }
.CodeMirror { position: relative; overflow: hidden; }
.CodeMirror-scroll { height: 100%; outline: 0px; position: relative; box-sizing: content-box; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit; background-repeat: inherit; }
.CodeMirror-sizer { position: relative; }
.CodeMirror-gutter-filler, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-vscrollbar { position: absolute; z-index: 6; display: none; outline: 0px; }
.CodeMirror-vscrollbar { right: 0px; top: 0px; overflow: hidden; }
.CodeMirror-hscrollbar { bottom: 0px; left: 0px; overflow: auto hidden; }
.CodeMirror-scrollbar-filler { right: 0px; bottom: 0px; }
.CodeMirror-gutter-filler { left: 0px; bottom: 0px; }
.CodeMirror-gutters { position: absolute; left: 0px; top: 0px; padding-bottom: 10px; z-index: 3; overflow-y: hidden; }
.CodeMirror-gutter { white-space: normal; height: 100%; box-sizing: content-box; padding-bottom: 30px; margin-bottom: -32px; display: inline-block; }
.CodeMirror-gutter-wrapper { position: absolute; z-index: 4; border: none !important; background-position: 0px 0px !important; }
.CodeMirror-gutter-background { position: absolute; top: 0px; bottom: 0px; z-index: 4; }
.CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; }
.CodeMirror-lines { cursor: text; }
.CodeMirror pre { border-radius: 0px; border-width: 0px; font-family: inherit; font-size: inherit; margin: 0px; white-space: pre; word-wrap: normal; color: inherit; z-index: 2; position: relative; overflow: visible; background-position: 0px 0px; }
.CodeMirror-wrap pre { word-wrap: break-word; white-space: pre-wrap; word-break: normal; }
.CodeMirror-code pre { border-right-width: 30px; border-right-style: solid; border-right-color: transparent; width: fit-content; }
.CodeMirror-wrap .CodeMirror-code pre { border-right-style: none; width: auto; }
.CodeMirror-linebackground { position: absolute; inset: 0px; z-index: 0; }
.CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto; }
.CodeMirror-wrap .CodeMirror-scroll { overflow-x: hidden; }
.CodeMirror-measure { position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden; }
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor { position: absolute; visibility: hidden; border-right-style: none; width: 0px; }
.CodeMirror div.CodeMirror-cursor { visibility: hidden; }
.CodeMirror-focused div.CodeMirror-cursor { visibility: inherit; }
.cm-searching { background-color: rgba(255, 255, 0, 0.4); }
span.cm-underlined { text-decoration: underline; }
span.cm-strikethrough { text-decoration: line-through; }
.cm-tw-syntaxerror { color: rgb(255, 255, 255); background-color: rgb(153, 0, 0); }
.cm-tw-deleted { text-decoration: line-through; }
.cm-tw-header5 { font-weight: 700; }
.cm-tw-listitem:first-child { padding-left: 10px; }
.cm-tw-box { border-style: solid; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-color: inherit; border-top-width: 0px !important; }
.cm-tw-underline { text-decoration: underline; }
@media print {
  .CodeMirror div.CodeMirror-cursor { visibility: hidden; }
}


:root {
  --mermaid-theme: night;
}

[lang='mermaid'] .label {
  color: #333;
}

/* CSS Document */

/** code highlight */

.cm-s-inner .cm-variable,
.cm-s-inner .cm-operator,
.cm-s-inner .cm-property {
    color: #b8bfc6;
}

.cm-s-inner .cm-keyword {
    color: #C88FD0;
}

.cm-s-inner .cm-tag {
    color: #7DF46A;
}

.cm-s-inner .cm-attribute {
    color: #7575E4;
}

.CodeMirror div.CodeMirror-cursor {
    border-left: 1px solid #b8bfc6;
    z-index: 3;
}

.cm-s-inner .cm-string {
    color: #D26B6B;
}

.cm-s-inner .cm-comment,
.cm-s-inner.cm-comment {
    color: #DA924A;
}

.cm-s-inner .cm-header,
.cm-s-inner .cm-def,
.cm-s-inner.cm-header,
.cm-s-inner.cm-def {
    color: #8d8df0;
}

.cm-s-inner .cm-quote,
.cm-s-inner.cm-quote {
    color: #57ac57;
}

.cm-s-inner .cm-hr {
    color: #d8d5d5;
}

.cm-s-inner .cm-link {
    color: #d3d3ef;
}

.cm-s-inner .cm-negative {
    color: #d95050;
}

.cm-s-inner .cm-positive {
    color: #50e650;
}

.cm-s-inner .cm-string-2 {
    color: #f50;
}

.cm-s-inner .cm-meta,
.cm-s-inner .cm-qualifier {
    color: #b7b3b3;
}

.cm-s-inner .cm-builtin {
    color: #f3b3f8;
}

.cm-s-inner .cm-bracket {
    color: #997;
}

.cm-s-inner .cm-atom,
.cm-s-inner.cm-atom {
    color: #84B6CB;
}

.cm-s-inner .cm-number {
    color: #64AB8F;
}

.cm-s-inner .cm-variable {
    color: #b8bfc6;
}

.cm-s-inner .cm-variable-2 {
    color: #9FBAD5;
}

.cm-s-inner .cm-variable-3 {
    color: #1cc685;
}

.CodeMirror-selectedtext,
.CodeMirror-selected {
    background: #4a89dc;
    color: #fff !important;
    text-shadow: none;
}

.CodeMirror-gutters {
    border-right: none;
}

/* CSS Document */

/** markdown source **/
.cm-s-typora-default .cm-header, 
.cm-s-typora-default .cm-property
{
    color: #cebcca;
}

.CodeMirror.cm-s-typora-default div.CodeMirror-cursor{
    border-left: 3px solid #b8bfc6;
}

.cm-s-typora-default .cm-comment {
    color: #9FB1FF;
}

.cm-s-typora-default .cm-string {
    color: #A7A7D9
}

.cm-s-typora-default .cm-atom, .cm-s-typora-default .cm-number {
    color: #848695;
    font-style: italic;
}

.cm-s-typora-default .cm-link {
    color: #95B94B;
}

.cm-s-typora-default .CodeMirror-activeline-background {
    background: rgba(51, 51, 51, 0.72);
}

.cm-s-typora-default .cm-comment, .cm-s-typora-default .cm-code {
	color: #8aa1e1;
}@import "";
@import "";
@import "";

:root {
    --bg-color:  #363B40;
    --side-bar-bg-color: #2E3033;
    --text-color: #b8bfc6;

    --select-text-bg-color:#4a89dc;

    --item-hover-bg-color: #0a0d16;
    --control-text-color: #b7b7b7;
    --control-text-hover-color: #eee;
    --window-border: 1px solid #555;

    --active-file-bg-color: rgb(34, 34, 34);
    --active-file-border-color: #8d8df0;

    --primary-color: #a3d5fe;

    --active-file-text-color: white;
    --item-hover-bg-color: #70717d;
    --item-hover-text-color: white;
    --primary-color: #6dc1e7;

    --rawblock-edit-panel-bd: #333;

    --search-select-bg-color: #428bca;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

html,
body {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    background: #363B40;
    background: var(--bg-color);
    fill: currentColor;
    line-height: 1.625rem;
}

#write {
    max-width: 914px;
}


@media only screen and (min-width: 1400px) {
	#write {
		max-width: 1024px;
	}
}

@media only screen and (min-width: 1800px) {
	#write {
		max-width: 1200px;
	}
}

html,
body,
button,
input,
select,
textarea,
div.code-tooltip-content {
    color: #b8bfc6;
    border-color: transparent;
}

div.code-tooltip,
.md-hover-tip .md-arrow:after {
    background: #333;
}

.native-window #md-notification {
    border: 1px solid #70717d;
}

.popover.bottom > .arrow:after {
    border-bottom-color: #333;
}

html,
body,
button,
input,
select,
textarea {
    font-family: "Helvetica Neue", Helvetica, Arial, 'Segoe UI Emoji', sans-serif;
}

hr {
    height: 2px;
    border: 0;
    margin: 24px 0 !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Lucida Grande", "Corbel", sans-serif;
    font-weight: normal;
    clear: both;
    -ms-word-wrap: break-word;
    word-wrap: break-word;
    margin: 0;
    padding: 0;
    color: #DEDEDE
}

h1 {
    font-size: 2.5rem;
    /* 36px */
    line-height: 2.75rem;
    /* 40px */
    margin-bottom: 1.5rem;
    /* 24px */
    letter-spacing: -1.5px;
}

h2 {
    font-size: 1.63rem;
    /* 24px */
    line-height: 1.875rem;
    /* 30px */
    margin-bottom: 1.5rem;
    /* 24px */
    letter-spacing: -1px;
    font-weight: bold;
}

h3 {
    font-size: 1.17rem;
    /* 18px */
    line-height: 1.5rem;
    /* 24px */
    margin-bottom: 1.5rem;
    /* 24px */
    letter-spacing: -1px;
    font-weight: bold;
}

h4 {
    font-size: 1.12rem;
    /* 16px */
    line-height: 1.375rem;
    /* 22px */
    margin-bottom: 1.5rem;
    /* 24px */
    color: white;
}

h5 {
    font-size: 0.97rem;
    /* 16px */
    line-height: 1.25rem;
    /* 22px */
    margin-bottom: 1.5rem;
    /* 24px */
    font-weight: bold;
}

h6 {
    font-size: 0.93rem;
    /* 16px */
    line-height: 1rem;
    /* 16px */
    margin-bottom: 0.75rem;
    color: white;
}

@media (min-width: 980px) {
    h3.md-focus:before,
    h4.md-focus:before,
    h5.md-focus:before,
    h6.md-focus:before {
        color: #ddd;
        border: 1px solid #ddd;
        border-radius: 3px;
        position: absolute;
        left: -1.642857143rem;
        top: .357142857rem;
        float: left;
        font-size: 9px;
        padding-left: 2px;
        padding-right: 2px;
        vertical-align: bottom;
        font-weight: normal;
        line-height: normal;
    }

    h3.md-focus:before {
        content: 'h3';
    }

    h4.md-focus:before {
        content: 'h4';
    }

    h5.md-focus:before {
        content: 'h5';
        top: 0px;
    }

    h6.md-focus:before {
        content: 'h6';
        top: 0px;
    }
}

a {
    text-decoration: none;
    outline: 0;
}

a:hover {
    outline: 0;
}

a:focus {
    outline: thin dotted;
}

sup.md-footnote {
    background-color: #555;
    color: #ddd;
}

p {
    -ms-word-wrap: break-word;
    word-wrap: break-word;
}

p,
ul,
dd,
ol,
hr,
address,
pre,
table,
iframe,
.wp-caption,
.wp-audio-shortcode,
.wp-video-shortcode {
    margin-top: 0;
    margin-bottom: 1.5rem;
    /* 24px */
}

audio:not([controls]) {
    display: none;
}

[hidden] {
    display: none;
}

::-moz-selection {
    background: #4a89dc;
    color: #fff;
    text-shadow: none;
}

*.in-text-selection,
::selection {
    background: #4a89dc;
    color: #fff;
    text-shadow: none;
}

ul,
ol {
    padding: 0 0 0 1.875rem;
    /* 30px */
}

ul {
    list-style: square;
}

ol {
    list-style: decimal;
}

ul ul,
ol ol,
ul ol,
ol ul {
    margin: 0;
}

b,
th,
dt,
strong {
    font-weight: bold;
}

i,
em,
dfn,
cite {
    font-style: italic;
}

blockquote {
    padding-left: 1.875rem;
    margin: 0 0 1.875rem 1.875rem;
    border-left: solid 2px #474d54;
    padding-left: 30px;
    margin-top: 35px;
}

pre,
code,
kbd,
tt,
var {
    font-size: 0.875em;
    font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
}

code,
tt,
var {
    background: rgba(0, 0, 0, 0.05);
}

kbd {
    padding: 2px 4px;
    font-size: 90%;
    color: #fff;
    background-color: #333;
    border-radius: 3px;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
}

pre.md-fences {
    padding: 10px 10px 10px 30px;
    margin-bottom: 20px;
    background: #333;
}

.CodeMirror-gutters {
    background: #333;
    border-right: 1px solid transparent;
}

.enable-diagrams pre.md-fences[lang="sequence"] .code-tooltip,
.enable-diagrams pre.md-fences[lang="flow"] .code-tooltip,
.enable-diagrams pre.md-fences[lang="mermaid"] .code-tooltip {
    bottom: -2.2em;
    right: 4px;
}

code,
kbd,
tt,
var {
    padding: 2px 5px;
}

table {
    max-width: 100%;
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

th,
td {
    padding: 5px 10px;
    vertical-align: top;
}

a {
    -webkit-transition: all .2s ease-in-out;
    transition: all .2s ease-in-out;
}

hr {
    background: #474d54;
    /* variable */
}

h1 {
    margin-top: 2em;
}

a {
    color: #e0e0e0;
    text-decoration: underline;
}

a:hover {
    color: #fff;
}

.md-inline-math script {
    color: #81b1db;
}

b,
th,
dt,
strong {
    color: #DEDEDE;
    /* variable */
}

mark {
    background: #D3D40E;
}

blockquote {
    color: #9DA2A6;
}

table a {
    color: #DEDEDE;
    /* variable */
}

th,
td {
    border: solid 1px #474d54;
    /* variable */
}

.task-list {
    padding-left: 0;
}

.md-task-list-item {
    padding-left: 1.25rem;
}

.md-task-list-item > input {
    top: auto;
}

.md-task-list-item > input:before {
    content: "";
    display: inline-block;
    width: 0.875rem;
    height: 0.875rem;
    vertical-align: middle;
    text-align: center;
    border: 1px solid #b8bfc6;
    background-color: #363B40;
    margin-top: -0.4rem;
}

.md-task-list-item > input:checked:before,
.md-task-list-item > input[checked]:before {
    content: '\221A';
    /*◘*/
    font-size: 0.625rem;
    line-height: 0.625rem;
    color: #DEDEDE;
}

/** quick open **/
.auto-suggest-container {
    border: 0px;
    background-color: #525C65;
}

#typora-quick-open {
    background-color: #525C65;
}

#typora-quick-open input{
    background-color: #525C65;
    border: 0;
    border-bottom: 1px solid grey;
}

.typora-quick-open-item {
    background-color: inherit;
    color: inherit;
}

.typora-quick-open-item.active,
.typora-quick-open-item:hover {
    background-color: #4D8BDB;
    color: white;
}

.typora-quick-open-item:hover {
    background-color: rgba(77, 139, 219, 0.8);
}

.typora-search-spinner > div {
  background-color: #fff;
}

#write pre.md-meta-block {
    border-bottom: 1px dashed #ccc;
    background: transparent;
    padding-bottom: 0.6em;
    line-height: 1.6em;
}

.btn,
.btn .btn-default {
    background: transparent;
    color: #b8bfc6;
}

.ty-table-edit {
    border-top: 1px solid gray;
    background-color: #363B40;
}

.popover-title {
    background: transparent;
}

.md-image>.md-meta {
    color: #BBBBBB;
    background: transparent;
}

.md-expand.md-image>.md-meta {
    color: #DDD;
}

#write>h3:before,
#write>h4:before,
#write>h5:before,
#write>h6:before {
    border: none;
    border-radius: 0px;
    color: #888;
    text-decoration: underline;
    left: -1.4rem;
    top: 0.2rem;
}

#write>h3.md-focus:before {
    top: 2px;
}

#write>h4.md-focus:before {
    top: 2px;
}

.md-toc-item {
    color: #A8C2DC;
}

#write div.md-toc-tooltip {
    background-color: #363B40;
}

.dropdown-menu .btn:hover,
.dropdown-menu .btn:focus,
.md-toc .btn:hover,
.md-toc .btn:focus {
    color: white;
    background: black;
}

#toc-dropmenu {
    background: rgba(50, 54, 59, 0.93);
    border: 1px solid rgba(253, 253, 253, 0.15);
}

#toc-dropmenu .divider {
    background-color: #9b9b9b;
}

.outline-expander:before {
    top: 2px;
}

#typora-sidebar {
    box-shadow: none;
    border-right: 1px dashed;
    border-right: none;
}

.sidebar-tabs {
    border-bottom:0;
}

#typora-sidebar:hover .outline-title-wrapper {
    border-left: 1px dashed;
}

.outline-title-wrapper .btn {
    color: inherit;
}

.outline-item:hover {
    border-color: #363B40;
    background-color: #363B40;
    color: white;
}

h1.md-focus .md-attr,
h2.md-focus .md-attr,
h3.md-focus .md-attr,
h4.md-focus .md-attr,
h5.md-focus .md-attr,
h6.md-focus .md-attr,
.md-header-span .md-attr {
    color: #8C8E92;
    display: inline;
}

.md-comment {
    color: #5a95e3;
    opacity: 0.8;
}

.md-inline-math svg {
    color: #b8bfc6;
}

#math-inline-preview .md-arrow:after {
    background: black;
}

.modal-content {
    background: var(--bg-color);
    border: 0;
}

.modal-title {
    font-size: 1.5em;
}

.modal-content input {
    background-color: rgba(26, 21, 21, 0.51);
    color: white;
}

.modal-content .input-group-addon {
    color: white;
}

.modal-backdrop {
    background-color: rgba(174, 174, 174, 0.7);
}

.modal-content .btn-primary {
    border-color: var(--primary-color);
}

.md-table-resize-popover {
    background-color: #333;
}

.form-inline .input-group .input-group-addon {
    color: white;
}

#md-searchpanel {
    border-bottom: 1px dashed grey;
}

/** UI for electron */

.context-menu,
#spell-check-panel,
#footer-word-count-info {
    background-color: #42464A;
}

.context-menu.dropdown-menu .divider,
.dropdown-menu .divider {
    background-color: #777777;
    opacity: 1;
}

footer {
    color: inherit;
}

@media (max-width: 1000px) {
    footer {
        border-top: none;
    }
    footer:hover {
        color: inherit;
    }
}

#file-info-file-path .file-info-field-value:hover {
    background-color: #555;
    color: #dedede;
}

.megamenu-content,
.megamenu-opened header {
    background: var(--bg-color);
}

.megamenu-menu-panel h2,
.megamenu-menu-panel h1,
.long-btn {
    color: inherit;
}

.megamenu-menu-panel input[type='text'] {
    background: inherit;
    border: 0;
    border-bottom: 1px solid;
}

#recent-file-panel-action-btn {
    background: inherit;
    border: 1px grey solid;
}

.megamenu-menu-panel .dropdown-menu > li > a {
    color: inherit;
    background-color: #2F353A;
    text-decoration: none;
}

.megamenu-menu-panel table td:nth-child(1) {
    color: inherit;
    font-weight: bold;
}

.megamenu-menu-panel tbody tr:hover td:nth-child(1) {
    color: white;
}

.modal-footer .btn-default, 
.modal-footer .btn-primary,
.modal-footer .btn-default:not(:hover) {
    border: 1px solid;
    border-color: transparent;
}

.btn-primary {
    color: white;
}

.btn-default:hover, .btn-default:focus, .btn-default.focus, .btn-default:active, .btn-default.active, .open > .dropdown-toggle.btn-default {
    color: white;
    border: 1px solid #ddd;
    background-color: inherit;
}

.modal-header {
    border-bottom: 0;
}

.modal-footer {
    border-top: 0;
}

#recent-file-panel tbody tr:nth-child(2n-1) {
    background-color: transparent !important;
}

.megamenu-menu-panel tbody tr:hover td:nth-child(2) {
    color: inherit;
}

.megamenu-menu-panel .btn {
    border: 1px solid #eee;
    background: transparent;
}

.mouse-hover .toolbar-icon.btn:hover,
#w-full.mouse-hover,
#w-pin.mouse-hover {
    background-color: inherit;
}

.typora-node::-webkit-scrollbar {
    width: 5px;
}

.typora-node::-webkit-scrollbar-thumb:vertical {
    background: rgba(250, 250, 250, 0.3);
}

.typora-node::-webkit-scrollbar-thumb:vertical:active {
    background: rgba(250, 250, 250, 0.5);
}

#w-unpin {
    background-color: #4182c4;
}

#top-titlebar, #top-titlebar * {
    color: var(--item-hover-text-color);
}

.typora-sourceview-on #toggle-sourceview-btn,
#footer-word-count:hover,
.ty-show-word-count #footer-word-count {
    background: #333333;
}

#toggle-sourceview-btn:hover {
    color: #eee;
    background: #333333;
}

/** focus mode */
.on-focus-mode .md-end-block:not(.md-focus):not(.md-focus-container) * {
    color: #686868 !important;
}

.on-focus-mode .md-end-block:not(.md-focus) img,
.on-focus-mode .md-task-list-item:not(.md-focus-container)>input {
    opacity: #686868 !important;
}

.on-focus-mode li[cid]:not(.md-focus-container){
    color: #686868;
}

.on-focus-mode .md-fences.md-focus .CodeMirror-code>*:not(.CodeMirror-activeline) *,
.on-focus-mode .CodeMirror.cm-s-inner:not(.CodeMirror-focused) * {
    color: #686868 !important;
}

.on-focus-mode .md-focus,
.on-focus-mode .md-focus-container {
    color: #fff;
}

.on-focus-mode #typora-source .CodeMirror-code>*:not(.CodeMirror-activeline) * {
    color: #686868 !important;
}


/*diagrams*/
#write .md-focus .md-diagram-panel {
    border: 1px solid #ddd;
    margin-left: -1px;
    width: calc(100% + 2px);
}

/*diagrams*/
#write .md-focus.md-fences-with-lineno .md-diagram-panel {
    margin-left: auto;
}

.md-diagram-panel-error {
    color: #f1908e;
}

.active-tab-files #info-panel-tab-file,
.active-tab-files #info-panel-tab-file:hover,
.active-tab-outline #info-panel-tab-outline,
.active-tab-outline #info-panel-tab-outline:hover {
    color: #eee;
}

.sidebar-footer-item:hover,
.footer-item:hover {
    background: inherit;
    color: white;
}

.ty-side-sort-btn.active,
.ty-side-sort-btn:hover,
.selected-folder-menu-item a:after {
    color: white;
}

#sidebar-files-menu {
    border:solid 1px;
    box-shadow: 4px 4px 20px rgba(0, 0, 0, 0.79);
    background-color: var(--bg-color);
}

.file-list-item {
    border-bottom:none;
}

.file-list-item-summary {
    opacity: 1;
}

.file-list-item.active:first-child {
    border-top: none;
}

.file-node-background {
    height: 32px;
}

.file-library-node.active>.file-node-content,
.file-list-item.active {
    color: white;
    color: var(--active-file-text-color);
}

.file-library-node.active>.file-node-background{
    background-color: rgb(34, 34, 34);
    background-color: var(--active-file-bg-color);
}
.file-list-item.active {
    background-color: rgb(34, 34, 34);
    background-color: var(--active-file-bg-color);
}

#ty-tooltip {
    background-color: black;
    color: #eee;
}

.md-task-list-item>input {
    margin-left: -1.3em;
    margin-top: 0.3rem;
    -webkit-appearance: none;
}

.md-mathjax-midline {
    background-color: #57616b;
    border-bottom: none;
}

footer.ty-footer {
    border-color: #656565;
}

.ty-preferences .btn-default {
    background: transparent;
}
.ty-preferences .btn-default:hover {
    background: #57616b;
}

.ty-preferences select {
    border: 1px solid #989698;
    height: 21px;
}

.ty-preferences .nav-group-item.active,
.export-item.active,
.export-items-list-control,
.export-detail {
    background: var(--item-hover-bg-color);
}

.ty-preferences input[type="search"] {
    border-color: #333;
    background: #333;
    line-height: 22px;
    border-radius: 6px;
    color: white;
}

.ty-preferences input[type="search"]:focus {
    box-shadow: none;
}

[data-is-directory="true"] .file-node-content {
    margin-bottom: 0;
}

.file-node-title {
    line-height: 22px;
}

.html-for-mac .file-node-open-state, .html-for-mac .file-node-icon {
    line-height: 26px;
}

::-webkit-scrollbar-thumb {
    background: rgba(230, 230, 230, 0.30);
}

::-webkit-scrollbar-thumb:active {
    background: rgba(230, 230, 230, 0.50);
}

#typora-sidebar:hover div.sidebar-content-content::-webkit-scrollbar-thumb:horizontal {
    background: rgba(230, 230, 230, 0.30);
}

.nav-group-item:active {
    background-color: #474d54 !important;
}

.md-search-hit {
    background: rgba(199, 140, 60, 0.81);
    color: #eee;
}

.md-search-hit * {
    color: #eee;
}

#md-searchpanel input {
    color: white;
}

.modal-backdrop.in {
    opacity: 1;
    backdrop-filter: blur(1px);
}

.clear-btn-icon {
    top: 8px;
}

/* try fix https://github.com/typora/typora-issues/issues/5253 */
.file-node-expanded>.file-node-children {
    display: grid;
  }

.md-alert-text-note {
    color: rgb(47, 129, 247);
}
.md-alert-text-important {
    color: rgb(163, 113, 247);
}
.md-alert-text-warning {
    color:  rgb(210, 153, 34);
}

 @media print { @page {margin: 0 0 0 0;} body.typora-export {padding-left: 0; padding-right: 0;} #write {padding:0;}}
</style><title></title>
</head>
<body class='typora-export'><div class='typora-export-content'>
<div id='write'  class=''><h1 id='qm1-质量管理1）'><span>qm(1) 质量管理（1）</span></h1><p><strong><span>Proxmox Server Solutions GmbH</span>
<span>Proxmox 服务器解决方案有限公司</span></strong>
<a href='mailto:[support@proxmox.com](mailto:support@proxmox.com)' target='_blank' class='url'>[support@proxmox.com](mailto:support@proxmox.com)</a>
<span>version 8.2.3, Wed Jul 31 16:58:41 CEST 2024</span>
<span>版本 8.2.3， 星期三 Jul 31 16：58：41 CEST 2024</span></p><h2 id='name-名字'><span>NAME 名字</span></h2><p><span>qm - QEMU/KVM Virtual Machine Manager</span>
<span>qm - QEMU/KVM 虚拟机管理器</span></p><h2 id='synopsis-概要'><span>SYNOPSIS 概要</span></h2><p><strong><span>qm</span></strong><span> </span><COMMAND><span> [ARGS] [OPTIONS]</span>
<strong><span>qm</span></strong><span> </span><command><span> [参数] [选项]</span></p><p><strong><span>qm agent QM 代理</span></strong></p><p><span>An alias for </span><em><span>qm guest cmd</span></em><span>.</span>
<em><span>qm guest cmd</span></em><span> 的别名。</span></p><p><strong><span>qm cleanup</span></strong><span> </span><vmid><span> </span><clean-shutdown><span> </span><guest-requested>
<strong><span>qm 清理</span></strong><span> </span><vmid><span> </span><clean-shutdown><span> </span><guest-requested></p><p><span>Cleans up resources like tap devices, vgpus, etc. Called after a vm shuts down, crashes, etc.</span>
<span>清理 tap 设备、vgpus 等资源。在 vm 关闭、崩溃等后调用。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><clean-shutdown><span>: </span><boolean><span> </span><clean-shutdown><span>： </span><boolean></p><p><span>Indicates if qemu shutdown cleanly. 指示 qemu 是否干净地关机。</span></p></li><li><p><guest-requested><span>: </span><boolean><span> </span><guest-requested><span>： </span><boolean></p><p><span>Indicates if the shutdown was requested by the guest or via qmp. 指示关闭是由客户机请求的，还是通过 qmp 请求的。</span></p></li></ul><p><strong><span>qm clone</span></strong><span> </span><vmid><span> </span><newid><span> [OPTIONS]</span>
<strong><span>qm clone</span></strong><span> </span><vmid><span> </span><newid><span> [选项]</span></p><p><span>Create a copy of virtual machine/template.</span>
<span>创建虚拟机/模板的副本。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><newid><span>: </span><integer><span> (100 - 999999999) </span><newid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>VMID for the clone. 克隆的 VMID。</span></p></li><li><p><span>--bwlimit </span><integer><span> (0 - N) (</span><em><span>default =</span></em><span> clone limit from datacenter or storage config) --bwlimit </span><integer><span> （0 - N） （</span><em><span>默认值 =</span></em><span> 来自数据中心或存储配置的克隆限制）</span></p><p><span>Override I/O bandwidth limit (in KiB/s). 覆盖 I/O 带宽限制（以 KiB/s 为单位）。</span></p></li><li><p><span>--description </span><string></p><p><span>Description for the new VM. 新 VM 的说明。</span></p></li><li><p><span>--format &lt;qcow2 | raw | vmdk&gt;</span></p><p><span>Target format for file storage. Only valid for full clone. 文件存储的目标格式。仅对完整克隆有效。</span></p></li><li><p><span>--full </span><boolean></p><p><span>Create a full copy of all disks. This is always done when you clone a normal VM. For VM templates, we try to create a linked clone by default. 创建所有磁盘的完整副本。在克隆普通 VM 时，始终会执行此操作。对于 VM 模板，默认情况下，我们尝试创建链接克隆。</span></p></li><li><p><span>--name </span><string></p><p><span>Set a name for the new VM. 为新 VM 设置名称。</span></p></li><li><p><span>--pool </span><string></p><p><span>Add the new VM to the specified pool. 将新 VM 添加到指定的池中。</span></p></li><li><p><span>--snapname </span><string></p><p><span>The name of the snapshot. 快照的名称。</span></p></li><li><p><span>--storage </span><storage ID><span> --storage &lt;存储 ID&gt;</span></p><p><span>Target storage for full clone. 完整克隆的目标存储。</span></p></li><li><p><span>--target </span><string></p><p><span>Target node. Only allowed if the original VM is on shared storage. 目标节点。仅当原始 VM 位于共享存储上时才允许。</span></p></li></ul><p><strong><span>qm cloudinit dump</span></strong><span> </span><vmid><span> </span><type>
<strong><span>qm cloudinit 转储</span></strong><span> </span><vmid><span> </span><type></p><p><span>Get automatically generated cloudinit config.</span>
<span>获取自动生成的 cloudinit 配置。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><type><span>: &lt;meta | network | user&gt; </span><type><span>： &lt;meta | 网络 | 用户&gt;</span></p><p><span>Config type. 配置类型。</span></p></li></ul><p><strong><span>qm cloudinit pending</span></strong><span> </span><vmid>
<strong><span>qm cloudinit 挂起</span></strong><span> </span><vmid></p><p><span>Get the cloudinit configuration with both current and pending values.</span>
<span>获取包含当前值和挂起值的 cloudinit 配置。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li></ul><p><strong><span>qm cloudinit update</span></strong><span> </span><vmid>
<strong><span>qm cloudinit 更新</span></strong><span> </span><vmid></p><p><span>Regenerate and change cloudinit config drive.</span>
<span>重新生成并更改 cloudinit 配置驱动器。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li></ul><p><strong><span>qm config</span></strong><span> </span><vmid><span> [OPTIONS]</span>
<strong><span>qm config</span></strong><span> </span><vmid><span> [选项]</span></p><p><span>Get the virtual machine configuration with pending configuration changes applied. Set the </span><em><span>current</span></em><span> parameter to get the current configuration instead.</span>
<span>获取应用了挂起配置更改的虚拟机配置。设置</span><em><span>当前</span></em><span>参数以获取当前配置。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><span>--current </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --current </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Get current values (instead of pending values). 获取当前值（而不是挂起值）。</span></p></li><li><p><span>--snapshot </span><string></p><p><span>Fetch config values from given snapshot. 从给定的快照中获取配置值。</span></p></li></ul><p><strong><span>qm create</span></strong><span> </span><vmid><span> [OPTIONS]</span>
<strong><span>qm create</span></strong><span> </span><vmid><span> [选项]</span></p><p><span>Create or restore a virtual machine.</span>
<span>创建或还原虚拟机。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><span>--acpi </span><boolean><span> (</span><em><span>default =</span></em><span> 1) --acpi </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>Enable/disable ACPI. 启用/禁用 ACPI。</span></p></li><li><p><span>--affinity </span><string><span> --亲和力 </span><string></p><p><span>List of host cores used to execute guest processes, for example: 0,5,8-11 用于执行客户机进程的主机核心列表，例如：0,5,8-11</span></p></li><li><p><span>--agent [enabled=]&lt;1|0&gt; [,freeze-fs-on-backup=&lt;1|0&gt;] [,fstrim_cloned_disks=&lt;1|0&gt;] [,type=&lt;virtio|isa&gt;] --agent [enabled=]&lt;1|0&gt; [，freeze-fs-on-backup=&lt;1|0&gt;] [，fstrim_cloned_disks=&lt;1|0&gt;] [，type=&lt;virtio|isa&gt;]</span></p><p><span>Enable/disable communication with the QEMU Guest Agent and its properties. 启用/禁用与 QEMU Guest Agent 及其属性的通信。</span></p></li><li><p><span>--arch &lt;aarch64 | x86_64&gt;</span></p><p><span>Virtual processor architecture. Defaults to the host. 虚拟处理器体系结构。默认为主机。</span></p></li><li><p><span>--archive </span><string></p><p><span>The backup archive. Either the file system path to a .tar or .vma file (use </span><em><span>-</span></em><span> to pipe data from stdin) or a proxmox storage backup volume identifier. 备份存档。.tar 或 .vma 文件的文件系统路径（使用 </span><em><span>-</span></em><span> 从 stdin 输送数据）或 proxmox 存储备份卷标识符。</span></p></li><li><p><span>--args </span><string></p><p><span>Arbitrary arguments passed to kvm. 传递给 KVM 的任意参数。</span></p></li><li><p><span>--audio0 device=&lt;ich9-intel-hda|intel-hda|AC97&gt; [,driver=&lt;spice|none&gt;] --audio0 device=&lt;ich9-intel-had|intel-had|AC97&gt; [，驱动程序=&lt;spice|none&gt;]</span></p><p><span>Configure a audio device, useful in combination with QXL/Spice. 配置音频设备，与 QXL/Spice 结合使用很有用。</span></p></li><li><p><span>--autostart </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --autostart </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Automatic restart after crash (currently ignored). 崩溃后自动重启（当前忽略）。</span></p></li><li><p><span>--balloon </span><integer><span> (0 - N) --气球 </span><integer><span> （0 - N）</span></p><p><span>Amount of target RAM for the VM in MiB. Using zero disables the ballon driver. VM 的目标 RAM 量（以 MiB 为单位）。使用零将禁用气球驱动器。</span></p></li><li><p><span>--bios &lt;ovmf | seabios&gt; (</span><em><span>default =</span></em><span> seabios) --bios &lt;ovmf | seabios&gt;（</span><em><span>默认值 =</span></em><span> seabios）</span></p><p><span>Select BIOS implementation. 选择 BIOS 实现。</span></p></li><li><p><span>--boot [[legacy=]&lt;[acdn]{1,4}&gt;] [,order=&lt;device[;device...]&gt;] --boot [[legacy=]&lt;[acdn]{1,4}&gt;] [，order=&lt;device[;设备...]&gt;]</span></p><p><span>Specify guest boot order. Use the </span><em><span>order=</span></em><span> sub-property as usage with no key or </span><em><span>legacy=</span></em><span> is deprecated. 指定客户机启动顺序。使用 </span><em><span>order=</span></em><span> 子属性，因为不带键或 </span><em><span>legacy=</span></em><span> 的用法已弃用。</span></p></li><li><p><span>--bootdisk (ide|sata|scsi|virtio)\d+ --bootdisk （IDE|SATA|SCSI|virtio）\d+</span></p><p><span>Enable booting from specified disk. Deprecated: Use </span><em><span>boot: order=foo;bar</span></em><span> instead. 启用从指定磁盘启动。已弃用：使用 </span><em><span>boot： order=foo;条</span></em><span>形图。</span></p></li><li><p><span>--bwlimit </span><integer><span> (0 - N) (</span><em><span>default =</span></em><span> restore limit from datacenter or storage config) --bwlimit </span><integer><span> （0 - N） （</span><em><span>默认值 =</span></em><span> 从数据中心或存储配置还原限制）</span></p><p><span>Override I/O bandwidth limit (in KiB/s). 覆盖 I/O 带宽限制（以 KiB/s 为单位）。</span></p></li><li><p><span>--cdrom </span><volume><span> --cdrom &lt;卷&gt;</span></p><p><span>This is an alias for option -ide2 这是选项 -ide2 的别名</span></p></li><li><p><span>--cicustom [meta=</span><volume><span>] [,network=</span><volume><span>] [,user=</span><volume><span>] [,vendor=</span><volume><span>] --cicustom [meta=</span><volume><span>] [，network=</span><volume><span>] [，user=</span><volume><span>] [，vendor=</span><volume><span>]</span></p><p><span>cloud-init: Specify custom files to replace the automatically generated ones at start. cloud-init：指定自定义文件以替换开始时自动生成的文件。</span></p></li><li><p><span>--cipassword </span><password><span> --cipassword &lt;密码&gt;</span></p><p><span>cloud-init: Password to assign the user. Using this is generally not recommended. Use ssh keys instead. Also note that older cloud-init versions do not support hashed passwords. cloud-init：用于分配用户的密码。通常不建议使用此工具。请改用 ssh 密钥。另请注意，较旧的 cloud-init 版本不支持哈希密码。</span></p></li><li><p><span>--citype &lt;configdrive2 | nocloud | opennebula&gt;</span></p><p><span>Specifies the cloud-init configuration format. The default depends on the configured operating system type (ostype. We use the nocloud format for Linux, and configdrive2 for windows. 指定 cloud-init 配置格式。默认值取决于配置的操作系统类型 （ostype.我们对 Linux 使用 nocloud 格式，对 Windows 使用 configdrive2 格式。</span></p></li><li><p><span>--ciupgrade </span><boolean><span> (</span><em><span>default =</span></em><span> 1) --ciupgrade </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>cloud-init: do an automatic package upgrade after the first boot. cloud-init：首次启动后自动升级包。</span></p></li><li><p><span>--ciuser </span><string></p><p><span>cloud-init: User name to change ssh keys and password for instead of the image’s configured default user. cloud-init：用于更改 ssh 密钥和密码的用户名，而不是镜像配置的默认用户。</span></p></li><li><p><span>--cores </span><integer><span> (1 - N) (</span><em><span>default =</span></em><span> 1) --cores </span><integer><span> （1 - N） （</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>The number of cores per socket. 每个插槽的核心数。</span></p></li><li><p><span>--cpu [[cputype=]</span><string><span>] [,flags=&lt;+FLAG[;-FLAG...]&gt;] [,hidden=&lt;1|0&gt;] [,hv-vendor-id=</span><vendor-id><span>] [,phys-bits=&lt;8-64|host&gt;] [,reported-model=</span><enum><span>] --cpu [[cputype=]</span><string><span>] [，flags=&lt;+FLAG[;-FLAG...]&gt;] [，hidden=&lt;1|0&gt;] [，hv-vendor-id=</span><vendor-id><span>] [，phys-bits=&lt;8-64|host&gt;] [，reported-model=</span><enum><span>]</span></p><p><span>Emulated CPU type. 模拟 CPU 类型。</span></p></li><li><p><span>--cpulimit </span><number><span> (0 - 128) (</span><em><span>default =</span></em><span> 0) --cpulimit </span><number><span> （0 - 128） （</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Limit of CPU usage. CPU 使用率限制。</span></p></li><li><p><span>--cpuunits </span><integer><span> (1 - 262144) (</span><em><span>default =</span></em><span> cgroup v1: 1024, cgroup v2: 100) --cpuunits </span><integer><span> （1 - 262144） （</span><em><span>默认值 =</span></em><span> cgroup v1： 1024， cgroup v2： 100）</span></p><p><span>CPU weight for a VM, will be clamped to [1, 10000] in cgroup v2. 在 cgroup v2 中，VM 的 CPU 权重将限制为 [1， 10000]。</span></p></li><li><p><span>--description </span><string></p><p><span>Description for the VM. Shown in the web-interface VM’s summary. This is saved as comment inside the configuration file. VM 的说明。显示在 Web 界面 VM 的摘要中。这将在配置文件中另存为注释。</span></p></li><li><p><span>--efidisk0 [file=]</span><volume><span> [,efitype=&lt;2m|4m&gt;] [,format=</span><enum><span>] [,import-from=</span><source volume><span>] [,pre-enrolled-keys=&lt;1|0&gt;] [,size=</span><DiskSize><span>] --efidisk0 [file=]</span><volume><span> [，efitype=&lt;2m|4m&gt;] [，format=</span><enum><span>] [，import-from=</span><source volume><span>] [，pre-enrolled-keys=&lt;1|0&gt;] [，size=</span><DiskSize><span>]</span></p><p><span>Configure a disk for storing EFI vars. Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Note that SIZE_IN_GiB is ignored here and that the default EFI vars are copied to the volume instead. Use STORAGE_ID:0 and the </span><em><span>import-from</span></em><span> parameter to import from an existing volume. 配置用于存储 EFI var 的磁盘。使用特殊语法 STORAGE_ID：SIZE_IN_GiB 分配新卷。请注意，此处将忽略 SIZE_IN_GiB，并且默认的 EFI 变量将复制到卷中。使用 STORAGE_ID：0 和 </span><em><span>import-from</span></em><span> 参数从现有卷导入。</span></p></li><li><p><span>--force </span><boolean></p><p><span>Allow to overwrite existing VM. 允许覆盖现有 VM。</span><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9YHhAIJFCExAsKUkE8IAFFPIDUIqhBRSDRBUqC%0ACimFFBCBpCWx02IaZ3G2SdyxPZ7vHh6+mcnSZnFjKIge6Wj8zYzvPf9z/me5d8TM+F8WfbkNuFx5%0ABcDLLf/fAEZGRmx4eNh6enqsp6fHhoeHbWRk5D9aFeSlVqHNmzfb6H33sHnT7ZQmD5GfOMax6Sm+%0APl5h1Yc+xpYtW2SBbX1ReUkRGBkZsdH77mHLW95EOv4Ms3ueJh6YYPHUFF9aljJ63z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IUbAOP23KGZKjI48KnkuhcbiPbPCOBoeBikO%0ALk2VxjqNRilaAEqSZGEAbN261bZt+zW33XY7IAXXm6Ou0YhIMamaaUOl5WRrzg00viuKWWxpQUOH%0ANAZFQRpD48Xlkig0MTHBB95zG+VSylz1KCbWyDOh2XyK+56IqjWMKigkUnzWnPPFFFRRLZ29SQRU%0AELOGY4pZ6LKOlM07mZ07d/KOtw1TcB4sGkTDiDQ9K1IkrKeYmQC08d7pZLSiRBpE5s7aS0XAHFEK%0AAGY51Wr18g80Zmb33nsvX/z8XdSmj2AWOXhwkrxe46+79jB55Dh/3T2GxUhHextdXW2sXN7PNWtW%0AIQKDA71FFBoAjIgQkVg/a5+oHrU5zIznDhxk964xKpXKggAoTlWW8+OfPorlOQ//cjsDy1bS2dFO%0AW+diVly1iL6+Pqanpzl5qsL4pPHwN3/G1InDlMsZ7Z1tDA30cfWqIa5dexV9fb2YnT7UTxw4xsHJ%0Ao4yOjfOP8QOMjx/k4OQx7r777lY0zycXvJ02M4sxMjg4SL1eR0TYsGEDw8PD9PX10d7ejogUN3a1%0AGqpKCIE8z5mdnUVVqVarbN++nba2Nvbu3csDDzyAqrJ8+atb+zjn6e/vZ/Xq1axatYq1a9fS29tL%0AlmUMDQ1RKpXOm9EXvV6v1+tWr9eZnp5mZmaGWq1GjLHF62aiNZ+bnPfe45xrvTZzxMyYmZk56+LX%0AzKjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"><span>Requires option(s): archive 需要选项： archive</span></p></li><li><p><span>--freeze </span><boolean><span> --冻结 </span><boolean></p><p><span>Freeze CPU at startup (use </span><em><span>c</span></em><span> monitor command to start execution). 启动时冻结 CPU（使用 </span><em><span>c</span></em><span> monitor 命令开始执行）。</span></p></li><li><p><span>--hookscript </span><string></p><p><span>Script that will be executed during various steps in the vms lifetime. 将在 vms 生命周期的各个步骤中执行的脚本。</span></p></li><li><p><span>--hostpci[n] [[host=]&lt;HOSTPCIID[;HOSTPCIID2...]&gt;] [,device-id=</span><hex id><span>] [,legacy-igd=&lt;1|0&gt;] [,mapping=</span><mapping-id><span>] [,mdev=</span><string><span>] [,pcie=&lt;1|0&gt;] [,rombar=&lt;1|0&gt;] [,romfile=</span><string><span>] [,sub-device-id=</span><hex id><span>] [,sub-vendor-id=</span><hex id><span>] [,vendor-id=</span><hex id><span>] [,x-vga=&lt;1|0&gt;] --hostpci[n] [[host=]&lt;HOSTPCIID[;HOSTPCIID2...]&gt;] [，device-id=</span><hex id><span>] [，legacy-igd=&lt;1|0&gt;] [，mapping=</span><mapping-id><span>] [，mdev=</span><string><span>] [，pcie=&lt;1|0&gt;] [，rombar=&lt;1|0&gt;] [，romfile=</span><string><span>] [，sub-device-id=</span><hex id><span>] [，sub-vendor-id=</span><hex id><span>] [，vendor-id=</span><hex id><span>] [，x-vga=&lt;1|0&gt;]</span></p><p><span>Map host PCI devices into guest. 将主机 PCI 设备映射到客户机。</span></p></li><li><p><span>--hotplug </span><string><span> (</span><em><span>default =</span></em><span> network,disk,usb) --hotplug </span><string><span> （</span><em><span>默认 =</span></em><span> 网络，磁盘，usb）</span></p><p><span>Selectively enable hotplug features. This is a comma separated list of hotplug features: </span><em><span>network</span></em><span>, </span><em><span>disk</span></em><span>, </span><em><span>cpu</span></em><span>, </span><em><span>memory</span></em><span>, </span><em><span>usb</span></em><span> and </span><em><span>cloudinit</span></em><span>. Use </span><em><span>0</span></em><span> to disable hotplug completely. Using </span><em><span>1</span></em><span> as value is an alias for the default network,disk,usb. USB hotplugging is possible for guests with machine version &gt;= 7.1 and ostype l26 or windows &gt; 7. 有选择地启用热插拔功能。这是一个以逗号分隔的热插拔功能列表：</span><em><span>网络</span></em><span>、</span><em><span>磁盘</span></em><span>、</span><em><span>CPU</span></em><span>、</span><em><span>内存</span></em><span>、</span><em><span>USB</span></em><span> 和 </span><em><span>cloudinit</span></em><span>。使用 </span><em><span>0</span></em><span> 完全禁用热插拔。使用 </span><em><span>1</span></em><span> 作为值是默认网络、磁盘、USB 的别名。对于计算机版本 &gt;= 7.1 和 ostype l26 或 Windows &gt; 7 的乘客，可以使用 USB 热插拔。</span></p></li><li><p><span>--hugepages &lt;1024 | 2 | any&gt;</span></p><p><span>Enable/disable hugepages memory. 启用/禁用 hugepages 内存。</span></p></li><li><p><span>--ide[n] [file=]</span><volume><span> [,aio=&lt;native|threads|io_uring&gt;] [,backup=&lt;1|0&gt;] [,bps=</span><bps><span>] [,bps_max_length=</span><seconds><span>] [,bps_rd=</span><bps><span>] [,bps_rd_max_length=</span><seconds><span>] [,bps_wr=</span><bps><span>] [,bps_wr_max_length=</span><seconds><span>] [,cache=</span><enum><span>] [,cyls=</span><integer><span>] [,detect_zeroes=&lt;1|0&gt;] [,discard=&lt;ignore|on&gt;] [,format=</span><enum><span>] [,heads=</span><integer><span>] [,import-from=</span><source volume><span>] [,iops=</span><iops><span>] [,iops_max=</span><iops><span>] [,iops_max_length=</span><seconds><span>] [,iops_rd=</span><iops><span>] [,iops_rd_max=</span><iops><span>] [,iops_rd_max_length=</span><seconds><span>] [,iops_wr=</span><iops><span>] [,iops_wr_max=</span><iops><span>] [,iops_wr_max_length=</span><seconds><span>] [,mbps=</span><mbps><span>] [,mbps_max=</span><mbps><span>] [,mbps_rd=</span><mbps><span>] [,mbps_rd_max=</span><mbps><span>] [,mbps_wr=</span><mbps><span>] [,mbps_wr_max=</span><mbps><span>] [,media=&lt;cdrom|disk&gt;] [,model=</span><model><span>] [,replicate=&lt;1|0&gt;] [,rerror=&lt;ignore|report|stop&gt;] [,secs=</span><integer><span>] [,serial=</span><serial><span>] [,shared=&lt;1|0&gt;] [,size=</span><DiskSize><span>] [,snapshot=&lt;1|0&gt;] [,ssd=&lt;1|0&gt;] [,trans=&lt;none|lba|auto&gt;] [,werror=</span><enum><span>] [,wwn=</span><wwn><span>] --IDE[n] [file=] [，aio=] [，backup=&lt;1 |0&gt;] [，bps=] [，bps_max_length=] [，bps_rd=] [，bps_rd_max_length=] [，bps_wr=] [，bps_wr_max_length=] [，cache=] [，cyls=] [，detect_zeroes=&lt;1 |0&gt;] [，discard=] [，format=] [，heads=] [，import-from=] [，iops=] [，iops_max=] [，iops_max_length=] [，iops_rd=] [，iops_rd_max=] [，iops_rd_max_length=] [，iops_wr=] [，iops_wr_max=] [，iops_wr_max_length=] [，mbps=] [，mbps_max=] [，mbps_rd=] [，mbps_rd_max=] [，mbps_wr=] [，mbps_wr_max=] [，media=] [，model=] [，replicate=&lt;1 |0&gt;] [，rerror=] [，secs=] [，serial=] [，serial=] [&lt;1 |0&gt;，shared=] [，size=] [，snapshot=&lt;1 |0&gt;] [，ssd&lt;1 |0&gt;=] [，trans=] [，werror=] [，wwn=]</span></p><p><span>Use volume as IDE hard disk or CD-ROM (n is 0 to 3). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the </span><em><span>import-from</span></em><span> parameter to import from an existing volume. 使用卷作为 IDE 硬盘或 CD-ROM（n 为 0 到 3）。使用特殊语法 STORAGE_ID：SIZE_IN_GiB 分配新卷。使用 STORAGE_ID：0 和 </span><em><span>import-from</span></em><span> 参数从现有卷导入。</span></p></li><li><p><span>--ipconfig[n] [gw=</span><GatewayIPv4><span>] [,gw6=</span><GatewayIPv6><span>] [,ip=&lt;IPv4Format/CIDR&gt;] [,ip6=&lt;IPv6Format/CIDR&gt;] --ipconfig[n] [gw=</span><GatewayIPv4><span>] [，gw6=</span><GatewayIPv6><span>] [，ip=&lt;IPv4Format/CIDR&gt;] [，ip6=&lt;IPv6Format/CIDR&gt;]</span></p><p><span>cloud-init: Specify IP addresses and gateways for the corresponding interface. cloud-init：指定对应接口的IP地址和网关。IP addresses use CIDR notation, gateways are optional but need an IP of the same type specified. IP 地址使用 CIDR 表示法，网关是可选的，但需要指定的相同类型的 IP。The special string </span><em><span>dhcp</span></em><span> can be used for IP addresses to use DHCP, in which case no explicit gateway should be provided. For IPv6 the special string </span><em><span>auto</span></em><span> can be used to use stateless autoconfiguration. This requires cloud-init 19.4 or newer. 特殊字符串 </span><em><span>dhcp</span></em><span> 可用于 IP 地址以使用 DHCP，在这种情况下，不应提供显式网关。对于 IPv6，可以使用特殊字符串 </span><em><span>auto</span></em><span> 来使用无状态自动配置。这需要 cloud-init 19.4 或更高版本。If cloud-init is enabled and neither an IPv4 nor an IPv6 address is specified, it defaults to using dhcp on IPv4. 如果启用了 cloud-init，且未指定 IPv4 和 IPv6 地址，则默认在 IPv4 上使用 dhcp。</span></p></li><li><p><span>--ivshmem size=</span><integer><span> [,name=</span><string><span>] --ivshmem size=</span><integer><span> [，name=</span><string><span>]</span></p><p><span>Inter-VM shared memory. Useful for direct communication between VMs, or to the host. 虚拟机间共享内存。对于虚拟机之间的直接通信或与主机的直接通信非常有用。</span></p></li><li><p><span>--keephugepages </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --keephugepages </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Use together with hugepages. If enabled, hugepages will not not be deleted after VM shutdown and can be used for subsequent starts. 与 hugepages 一起使用。如果启用，则 Hugepages 在 VM 关闭后不会被删除，并且可用于后续启动。</span></p></li><li><p><span>--keyboard &lt;da | de | de-ch | en-gb | en-us | es | fi | fr | fr-be | fr-ca | fr-ch | hu | is | it | ja | lt | mk | nl | no | pl | pt | pt-br | sl | sv | tr&gt; --keyboard &lt;da | de | de-ch | en-gb | en-us | es | fi | fr | fr-be | fr-ca | fr-ch | 胡 | 是 | it | ja | lt | mk | nl | no | pl | pt | pt-br | sl | sv | tr&gt;</span></p><p><span>Keyboard layout for VNC server. This option is generally not required and is often better handled from within the guest OS. VNC 服务器的键盘布局。此选项通常不是必需的，通常最好在客户机操作系统中处理。</span></p></li><li><p><span>--kvm </span><boolean><span> (</span><em><span>default =</span></em><span> 1) --kvm </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>Enable/disable KVM hardware virtualization. 启用/禁用 KVM 硬件虚拟化。</span></p></li><li><p><span>--live-restore </span><boolean></p><p><span>Start the VM immediately while importing or restoring in the background. 在后台导入或还原时立即启动 VM。</span></p></li><li><p><span>--localtime </span><boolean></p><p><span>Set the real time clock (RTC) to local time. This is enabled by default if the ostype indicates a Microsoft Windows OS. 将实时时钟 （RTC） 设置为本地时间。如果 ostype 指示 Microsoft Windows 操作系统，则默认情况下启用此功能。</span></p></li><li><p><span>--lock &lt;backup | clone | create | migrate | rollback | snapshot | snapshot-delete | suspended | suspending&gt; --lock &lt;备份 | 克隆 | 创建 | 迁移 | 回滚 | 快照 | 快照删除 | 已暂停 | 挂起&gt;</span></p><p><span>Lock/unlock the VM. 锁定/解锁 VM。</span></p></li><li><p><span>--machine [[type=]</span><machine type><span>] [,viommu=&lt;intel|virtio&gt;] --machine [[type=]</span><machine type><span>] [，viommu=&lt;intel|virtio&gt;]</span></p><p><span>Specify the QEMU machine. 指定 QEMU 机器。</span></p></li><li><p><span>--memory [current=]</span><integer><span> --内存 [current=]</span><integer></p><p><span>Memory properties. 内存属性。</span></p></li><li><p><span>--migrate_downtime </span><number><span> (0 - N) (</span><em><span>default =</span></em><span> 0.1) --migrate_downtime </span><number><span> （0 - N） （</span><em><span>默认值 =</span></em><span> 0.1）</span></p><p><span>Set maximum tolerated downtime (in seconds) for migrations. Should the migration not be able to converge in the very end, because too much newly dirtied RAM needs to be transferred, the limit will be increased automatically step-by-step until migration can converge. 为迁移设置允许的最大停机时间（以秒为单位）。如果迁移最终无法收敛，因为需要传输太多新污染的 RAM，则限制将自动逐步增加，直到迁移可以收敛。</span></p></li><li><p><span>--migrate_speed </span><integer><span> (0 - N) (</span><em><span>default =</span></em><span> 0) --migrate_speed </span><integer><span>（0 - N） （</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Set maximum speed (in MB/s) for migrations. Value 0 is no limit. 设置迁移的最大速度（以 MB/s 为单位）。值 0 没有限制。</span></p></li><li><p><span>--name </span><string></p><p><span>Set a name for the VM. Only used on the configuration web interface. 为 VM 设置名称。仅在配置 Web 界面上使用。</span></p></li><li><p><span>--nameserver </span><string></p><p><span>cloud-init: Sets DNS server IP address for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set. cloud-init：设置容器的DNS服务器IP地址。如果 searchdomain 和 nameserver 均未设置，Create 将自动使用主机的设置。</span></p></li><li><p><span>--net[n] [model=]</span><enum><span> [,bridge=</span><bridge><span>] [,firewall=&lt;1|0&gt;] [,link_down=&lt;1|0&gt;] [,macaddr=</span><a href='XX:XX:XX:XX:XX:XX' target='_blank' class='url'>XX:XX:XX:XX:XX:XX</a><span>] [,mtu=</span><integer><span>] [,queues=</span><integer><span>] [,rate=</span><number><span>] [,tag=</span><integer><span>] [,trunks=&lt;vlanid[;vlanid...]&gt;] [,</span><model><span>=</span><macaddr><span>] --net[n] [model=]</span><enum><span> [，bridge=</span><bridge><span>] [，firewall=&lt;1|0&gt;] [，link_down=&lt;1|0&gt;] [，macaddr=&lt;XX：XX：XX：XX：XX：XX：XX&gt;] [，mtu=</span><integer><span>] [，queues=</span><integer><span>] [，rate=</span><number><span>] [，tag=</span><integer><span>] [，trunks=&lt;vlanid[;弗拉尼德...]&gt;] [，</span><model><span>=</span><macaddr><span>]</span></p><p><span>Specify network devices. 指定网络设备。</span></p></li><li><p><span>--numa </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --numa </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Enable/disable NUMA. 启用/禁用 NUMA。</span></p></li><li><p><span>--numa[n] cpus=&lt;id[-id];...&gt; [,hostnodes=&lt;id[-id];...&gt;] [,memory=</span><number><span>] [,policy=&lt;preferred|bind|interleave&gt;] --numa[n] cpus=&lt;id[-id];...&gt; [，hostnodes=&lt;id[-id];...&gt;] [，memory=</span><number><span>] [，policy=&lt;preferred|bind|interleave&gt;]</span></p><p><span>NUMA topology. NUMA 拓扑。</span></p></li><li><p><span>--onboot </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --onboot </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Specifies whether a VM will be started during system bootup. 指定在系统启动期间是否启动 VM。</span></p></li><li><p><span>--ostype &lt;l24 | l26 | other | solaris | w2k | w2k3 | w2k8 | win10 | win11 | win7 | win8 | wvista | wxp&gt; --ostype &lt;l24 | l26 | 其他 | Solaris | W2K | W2K3 | W2K8 | Win10 | Win11 | Win7 | Win8 | wvista | wxp&gt;</span></p><p><span>Specify guest operating system. 指定客户机操作系统。</span></p></li><li><p><span>--parallel[n] /dev/parport\d+|/dev/usb/lp\d+</span></p><p><span>Map host parallel devices (n is 0 to 2). 映射主机并行设备（n 为 0 到 2）。</span></p></li><li><p><span>--pool </span><string></p><p><span>Add the VM to the specified pool. 将 VM 添加到指定的池中。</span></p></li><li><p><span>--protection </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --protection </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Sets the protection flag of the VM. This will disable the remove VM and remove disk operations. 设置 VM 的保护标志。这将禁用删除 VM 和删除磁盘操作。</span></p></li><li><p><span>--reboot </span><boolean><span> (</span><em><span>default =</span></em><span> 1) --reboot </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>Allow reboot. If set to </span><em><span>0</span></em><span> the VM exit on reboot. 允许重新启动。如果设置为 </span><em><span>0</span></em><span>，则 VM 将在重新启动时退出。</span></p></li><li><p><span>--rng0 [source=]&lt;/dev/urandom|/dev/random|/dev/hwrng&gt; [,max_bytes=</span><integer><span>] [,period=</span><integer><span>] --rng0 [source=]&lt;/dev/urandom|/dev/random|/dev/hwrng&gt; [，max_bytes=</span><integer><span>] [，period=</span><integer><span>]</span></p><p><span>Configure a VirtIO-based Random Number Generator. 配置基于 VirtIO 的随机数生成器。</span></p></li><li><p><span>--sata[n] [file=]</span><volume><span> [,aio=&lt;native|threads|io_uring&gt;] [,backup=&lt;1|0&gt;] [,bps=</span><bps><span>] [,bps_max_length=</span><seconds><span>] [,bps_rd=</span><bps><span>] [,bps_rd_max_length=</span><seconds><span>] [,bps_wr=</span><bps><span>] [,bps_wr_max_length=</span><seconds><span>] [,cache=</span><enum><span>] [,cyls=</span><integer><span>] [,detect_zeroes=&lt;1|0&gt;] [,discard=&lt;ignore|on&gt;] [,format=</span><enum><span>] [,heads=</span><integer><span>] [,import-from=</span><source volume><span>] [,iops=</span><iops><span>] [,iops_max=</span><iops><span>] [,iops_max_length=</span><seconds><span>] [,iops_rd=</span><iops><span>] [,iops_rd_max=</span><iops><span>] [,iops_rd_max_length=</span><seconds><span>] [,iops_wr=</span><iops><span>] [,iops_wr_max=</span><iops><span>] [,iops_wr_max_length=</span><seconds><span>] [,mbps=</span><mbps><span>] [,mbps_max=</span><mbps><span>] [,mbps_rd=</span><mbps><span>] [,mbps_rd_max=</span><mbps><span>] [,mbps_wr=</span><mbps><span>] [,mbps_wr_max=</span><mbps><span>] [,media=&lt;cdrom|disk&gt;] [,replicate=&lt;1|0&gt;] [,rerror=&lt;ignore|report|stop&gt;] [,secs=</span><integer><span>] [,serial=</span><serial><span>] [,shared=&lt;1|0&gt;] [,size=</span><DiskSize><span>] [,snapshot=&lt;1|0&gt;] [,ssd=&lt;1|0&gt;] [,trans=&lt;none|lba|auto&gt;] [,werror=</span><enum><span>] [,wwn=</span><wwn><span>] --sata[n] [file=] [，aio=] [，backup=&lt;1 |0&gt;] [，bps=] [，bps_max_length=] [，bps_rd=] [，bps_rd_max_length=] [，bps_wr=] [，bps_wr_max_length=] [，cache=] [，cyls=] [，detect_zeroes=&lt;1 |0&gt;] [，discard=] [，format=] [，heads=] [，import-from=] [，iops=] [，iops_max=] [，iops_max_length=] [，iops_rd=] [，iops_rd_max=] [，iops_rd_max_length=] [，iops_wr=] [，iops_wr_max=] [，iops_wr_max_length=] [，mbps=] [，mbps_max=] [，mbps_rd=] [，mbps_rd_max=] [，mbps_wr=] [，mbps_wr_max=] [，media=] [，replicate=&lt;1 |0&gt;] [，rerror=] [，secs=] [，serial=] [，shared=&lt;1 |0&gt;] [，size=] [，snapshot=&lt;1 |0&gt;] [，ssd=&lt;1 |0&gt;] [，trans=] [，werror=] [，wwn=]</span></p><p><span>Use volume as SATA hard disk or CD-ROM (n is 0 to 5). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the </span><em><span>import-from</span></em><span> parameter to import from an existing volume. 使用卷作为 SATA 硬盘或 CD-ROM（n 为 0 到 5）。使用特殊语法 STORAGE_ID：SIZE_IN_GiB 分配新卷。使用 STORAGE_ID：0 和 </span><em><span>import-from</span></em><span> 参数从现有卷导入。</span></p></li><li><p><span>--scsi[n] [file=]</span><volume><span> [,aio=&lt;native|threads|io_uring&gt;] [,backup=&lt;1|0&gt;] [,bps=</span><bps><span>] [,bps_max_length=</span><seconds><span>] [,bps_rd=</span><bps><span>] [,bps_rd_max_length=</span><seconds><span>] [,bps_wr=</span><bps><span>] [,bps_wr_max_length=</span><seconds><span>] [,cache=</span><enum><span>] [,cyls=</span><integer><span>] [,detect_zeroes=&lt;1|0&gt;] [,discard=&lt;ignore|on&gt;] [,format=</span><enum><span>] [,heads=</span><integer><span>] [,import-from=</span><source volume><span>] [,iops=</span><iops><span>] [,iops_max=</span><iops><span>] [,iops_max_length=</span><seconds><span>] [,iops_rd=</span><iops><span>] [,iops_rd_max=</span><iops><span>] [,iops_rd_max_length=</span><seconds><span>] [,iops_wr=</span><iops><span>] [,iops_wr_max=</span><iops><span>] [,iops_wr_max_length=</span><seconds><span>] [,iothread=&lt;1|0&gt;] [,mbps=</span><mbps><span>] [,mbps_max=</span><mbps><span>] [,mbps_rd=</span><mbps><span>] [,mbps_rd_max=</span><mbps><span>] [,mbps_wr=</span><mbps><span>] [,mbps_wr_max=</span><mbps><span>] [,media=&lt;cdrom|disk&gt;] [,product=</span><product><span>] [,queues=</span><integer><span>] [,replicate=&lt;1|0&gt;] [,rerror=&lt;ignore|report|stop&gt;] [,ro=&lt;1|0&gt;] [,scsiblock=&lt;1|0&gt;] [,secs=</span><integer><span>] [,serial=</span><serial><span>] [,shared=&lt;1|0&gt;] [,size=</span><DiskSize><span>] [,snapshot=&lt;1|0&gt;] [,ssd=&lt;1|0&gt;] [,trans=&lt;none|lba|auto&gt;] [,vendor=</span><vendor><span>] [,werror=</span><enum><span>] [,wwn=</span><wwn><span>] --scsi[n] [file=] [，aio=] [，backup=&lt;1 |0&gt;] [，bps=] [，bps_max_length=] [，bps_rd=] [，bps_rd_max_length=] [，bps_wr=] [，bps_wr_max_length=] [，cache=] [，cyls=] [，detect_zeroes=&lt;1 |0&gt;] [，discard=] [，format=] [，heads=] [，import-from=] [，iops=] [，iops_max=] [，iops_max_length=] [，iops_rd=] [，iops_rd_max=] [，iops_rd_max_length=] [，iops_wr=] [，iops_wr_max=] [，iops_wr_max_length=] [，iothread=&lt;1 |0&gt;] [，mbps=] [，mbps_max=] [，mbps_rd=] [，mbps_rd_max=] [，mbps_wr=] [，mbps_wr_max=] [，media=] [，product=] [，queues=] [，replicate=&lt;1 |0&gt;] [，rerror=] [，ro=&lt;1 |0&gt;] [，scsiblock=&lt;1 |0&gt;] [，secs=] [，serial=] [，shared=&lt;1 |0&gt;] [，size=] [，snapshot=&lt;1 |0&gt;] [，ssd=&lt;1 |0&gt;] [，trans=] [，vendor=] [，werror=] [，wwn=]</span></p><p><span>Use volume as SCSI hard disk or CD-ROM (n is 0 to 30). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the </span><em><span>import-from</span></em><span> parameter to import from an existing volume. 使用卷作为 SCSI 硬盘或 CD-ROM（n 为 0 到 30）。使用特殊语法 STORAGE_ID：SIZE_IN_GiB 分配新卷。使用 STORAGE_ID：0 和 </span><em><span>import-from</span></em><span> 参数从现有卷导入。</span></p></li><li><p><span>--scsihw &lt;lsi | lsi53c810 | megasas | pvscsi | virtio-scsi-pci | virtio-scsi-single&gt; (</span><em><span>default =</span></em><span> lsi) --scsihw &lt;lsi | lsi53c810 | megasas | pvscsi | virtio-scsi-pci | virtio-scsi-single&gt;（</span><em><span>默认值 =</span></em><span> lsi）</span></p><p><span>SCSI controller model SCSI 控制器型号</span></p></li><li><p><span>--searchdomain </span><string></p><p><span>cloud-init: Sets DNS search domains for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set. cloud-init：设置容器的DNS搜索域。如果 searchdomain 和 nameserver 均未设置，Create 将自动使用主机的设置。</span></p></li><li><p><span>--serial[n] (/dev/.+|socket) --serial[n] （/dev/.+|套接字）</span></p><p><span>Create a serial device inside the VM (n is 0 to 3) 在 VM 内部创建串行设备（n 为 0 到 3）</span></p></li><li><p><span>--shares </span><integer><span> (0 - 50000) (</span><em><span>default =</span></em><span> 1000) --shares </span><integer><span> （0 - 50000） （</span><em><span>默认值 =</span></em><span> 1000）</span></p><p><span>Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. Number is relative to weights of all other running VMs. Using zero disables auto-ballooning. Auto-ballooning is done by pvestatd. 用于自动膨胀的内存份额量。数字越大，此 VM 获得的内存就越多。该数字与所有其他正在运行的 VM 的权重相关。使用零将禁用自动膨胀。自动气球是由 pvestatd 完成的。</span></p></li><li><p><span>--smbios1 [base64=&lt;1|0&gt;] [,family=</span><Base64 encoded string><span>] [,manufacturer=</span><Base64 encoded string><span>] [,product=</span><Base64 encoded string><span>] [,serial=</span><Base64 encoded string><span>] [,sku=</span><Base64 encoded string><span>] [,uuid=</span><UUID><span>] [,version=</span><Base64 encoded string><span>] --smbios1 [base64=&lt;1|0&gt;] [，family=&lt;Base64 编码字符串&gt;] [，manufacturer=&lt;Base64 编码字符串&gt;] [，product=&lt;Base64 编码字符串&gt;] [，serial=&lt;Base64 编码字符串&gt;] [，sku=&lt;Base64 编码字符串&gt;] [，uuid=</span><UUID><span>] [，version=&lt;Base64 编码字符串&gt;]</span></p><p><span>Specify SMBIOS type 1 fields. 指定 SMBIOS 类型 1 字段。</span></p></li><li><p><span>--smp </span><integer><span> (1 - N) (</span><em><span>default =</span></em><span> 1) --smp </span><integer><span> （1 - N） （</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>The number of CPUs. Please use option -sockets instead. CPU 的数量。请改用选项 -sockets。</span></p></li><li><p><span>--sockets </span><integer><span> (1 - N) (</span><em><span>default =</span></em><span> 1) --sockets </span><integer><span> （1 - N） （</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>The number of CPU sockets. CPU 插槽的数量。</span></p></li><li><p><span>--spice_enhancements [foldersharing=&lt;1|0&gt;] [,videostreaming=&lt;off|all|filter&gt;] --spice_enhancements [foldersharing=&lt;1|0&gt;] [，videostreaming=&lt;off|all|filter&gt;]</span></p><p><span>Configure additional enhancements for SPICE. 配置 SPICE 的其他增强功能。</span></p></li><li><p><span>--sshkeys </span><filepath><span> --sshkeys &lt;文件路径&gt;</span></p><p><span>cloud-init: Setup public SSH keys (one key per line, OpenSSH format). cloud-init：设置公有 SSH 密钥（每行一个密钥，OpenSSH 格式）。</span></p></li><li><p><span>--start </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --start </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Start VM after it was created successfully. 成功创建 VM 后启动 VM。</span></p></li><li><p><span>--startdate (now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS) (</span><em><span>default =</span></em><span> now) --startdate （现在 |YYYY-MM-DD |YYYY-MM-DDTHH：MM：SS） </span><em><span>（默认值 =</span></em><span> 现在）</span></p><p><span>Set the initial date of the real time clock. Valid format for date are:&#39;now&#39; or </span><em><span>2006-06-17T16:01:21</span></em><span> or </span><em><span>2006-06-17</span></em><span>. 设置实时时钟的初始日期。日期的有效格式为：“现在”或 </span><em><span>2006-06-17T16：01：21</span></em><span> 或 </span><em><span>2006-06-17</span></em><span>。</span></p></li><li><p><span>--startup </span><code>[[order=]\d+] [,up=\d+] [,down=\d+]</code><span> --startup &#39;[[订单=]\d+] [，up=\d+] [，down=\d+] &#39;</span></p><p><span>Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the </span><em><span>up</span></em><span> or </span><em><span>down</span></em><span> delay in seconds, which specifies a delay to wait before the next VM is started or stopped. 启动和关闭行为。Order 是一个非负数，用于定义一般启动顺序。通过反向排序完成关机。此外，还可以设置</span><em><span>启动</span></em><span>或</span><em><span>关闭</span></em><span>延迟（以秒为单位），这指定了在启动或停止下一个 VM 之前要等待的延迟。</span></p></li><li><p><span>--storage </span><storage ID><span> --storage &lt;存储 ID&gt;</span></p><p><span>Default storage. 默认存储。</span></p></li><li><p><span>--tablet </span><boolean><span> (</span><em><span>default =</span></em><span> 1) --tablet </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>Enable/disable the USB tablet device. 启用/禁用 USB 平板电脑设备。</span></p></li><li><p><span>--tags </span><string><span> --标签 </span><string></p><p><span>Tags of the VM. This is only meta information. VM 的标记。这只是元信息。</span></p></li><li><p><span>--tdf </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --tdf </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Enable/disable time drift fix. 启用/禁用时间漂移修复。</span></p></li><li><p><span>--template </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --template </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Enable/disable Template. 启用/禁用模板。</span></p></li><li><p><span>--tpmstate0 [file=]</span><volume><span> [,import-from=</span><source volume><span>] [,size=</span><DiskSize><span>] [,version=&lt;v1.2|v2.0&gt;] --tpmstate0 [file=]</span><volume><span> [，import-from=</span><source volume><span>] [，size=</span><DiskSize><span>] [，version=&lt;v1.2|v2.0&gt;]</span></p><p><span>Configure a Disk for storing TPM state. The format is fixed to </span><em><span>raw</span></em><span>. Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Note that SIZE_IN_GiB is ignored here and 4 MiB will be used instead. Use STORAGE_ID:0 and the </span><em><span>import-from</span></em><span> parameter to import from an existing volume. 配置用于存储 TPM 状态的磁盘。格式固定为</span><em><span>原始</span></em><span>格式。使用特殊语法 STORAGE_ID：SIZE_IN_GiB 分配新卷。请注意，此处忽略 SIZE_IN_GiB，而是使用 4 MiB。使用 STORAGE_ID：0 和 </span><em><span>import-from</span></em><span> 参数从现有卷导入。</span></p></li><li><p><span>--unique </span><boolean><span> --唯一 </span><boolean></p><p><span>Assign a unique random ethernet address. 分配一个唯一的随机以太网地址。</span><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9YHhAIJFCExAsKUkE8IAFFPIDUIqhBRSDRBUqC%0ACimFFBCBpCWx02IaZ3G2SdyxPZ7vHh6+mcnSZnFjKIge6Wj8zYzvPf9z/me5d8TM+F8WfbkNuFx5%0ABcDLLf/fAEZGRmx4eNh6enqsp6fHhoeHbWRk5D9aFeSlVqHNmzfb6H33sHnT7ZQmD5GfOMax6Sm+%0APl5h1Yc+xpYtW2SBbX1ReUkRGBkZsdH77mHLW95EOv4Ms3ueJh6YYPHUFF9aljJ63z3cf//9/5FI%0AvKQIDA8P293L2yhVjjH7t51ocDiviFecF46n7XzBreChhx4qNhH5t0XjJUVgx44ddGUZ9b/vIpQD%0AoRQIWSDJAiFL6B9axo4dO4gxAmANWVDLG+Ln82URMRGhVCqRHxonlAPqFXWKC4r6IhI6OMjMzBN4%0A/4LlTUQQEZxzZ32QJAlpmrb+p16vU6vVOHXq1AWjN18AnDj0F971vrs4OnmYJVkoDA4FCPUO172I%0ACgnt7SV++4vvsGhRJx3tJbIsRVVpsUnOBBABBVFEClKYwbKr7sTM7EIUnBcA7z21k7t49x1X8JXv%0AbOWra7rw5QRtcN8PLCfvvZJvb9vJycpJpg4/hp/N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oAjIgQkVg/a5+oHrU5zIznDhxk964xKpXKggAoTlWW8+OfPorlOQ//cjsDy1bS2dFO%0AW+diVly1iL6+Pqanpzl5qsL4pPHwN3/G1InDlMsZ7Z1tDA30cfWqIa5dexV9fb2YnT7UTxw4xsHJ%0Ao4yOjfOP8QOMjx/k4OQx7r777lY0zycXvJ02M4sxMjg4SL1eR0TYsGEDw8PD9PX10d7ejogUN3a1%0AGqpKCIE8z5mdnUVVqVarbN++nba2Nvbu3csDDzyAqrJ8+atb+zjn6e/vZ/Xq1axatYq1a9fS29tL%0AlmUMDQ1RKpXOm9EXvV6v1+tWr9eZnp5mZmaGWq1GjLHF62aiNZ+bnPfe45xrvTZzxMyYmZk56+LX%0AzKjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"><span>Requires option(s): archive 需要选项： archive</span></p></li><li><p><span>--unused[n] [file=]</span><volume></p><p><span>Reference to unused volumes. This is used internally, and should not be modified manually. 对未使用卷的引用。这是在内部使用的，不应手动修改。</span></p></li><li><p><span>--usb[n] [[host=]&lt;HOSTUSBDEVICE|spice&gt;] [,mapping=</span><mapping-id><span>] [,usb3=&lt;1|0&gt;] --usb[n] [[host=]&lt;HOSTUSBDEVICE|spice&gt;] [，mapping=</span><mapping-id><span>] [，usb3=&lt;1|0&gt;]</span></p><p><span>Configure an USB device (n is 0 to 4, for machine version &gt;= 7.1 and ostype l26 or windows &gt; 7, n can be up to 14). 配置 USB 设备（n 为 0 到 4，对于计算机版本 &gt;= 7.1 和 ostype l26 或 Windows &gt; 7，n 最多为 14）。</span></p></li><li><p><span>--vcpus </span><integer><span> (1 - N) (</span><em><span>default =</span></em><span> 0) --vcpus </span><integer><span> （1 - N） （</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Number of hotplugged vcpus. 热插拔的 vCPU 数量。</span></p></li><li><p><span>--vga [[type=]</span><enum><span>] [,clipboard=</span><vnc><span>] [,memory=</span><integer><span>] --vga [[type=]</span><enum><span>] [，clipboard=</span><vnc><span>] [，memory=</span><integer><span>]</span></p><p><span>Configure the VGA hardware. 配置 VGA 硬件。</span></p></li><li><p><span>--virtio[n] [file=]</span><volume><span> [,aio=&lt;native|threads|io_uring&gt;] [,backup=&lt;1|0&gt;] [,bps=</span><bps><span>] [,bps_max_length=</span><seconds><span>] [,bps_rd=</span><bps><span>] [,bps_rd_max_length=</span><seconds><span>] [,bps_wr=</span><bps><span>] [,bps_wr_max_length=</span><seconds><span>] [,cache=</span><enum><span>] [,cyls=</span><integer><span>] [,detect_zeroes=&lt;1|0&gt;] [,discard=&lt;ignore|on&gt;] [,format=</span><enum><span>] [,heads=</span><integer><span>] [,import-from=</span><source volume><span>] [,iops=</span><iops><span>] [,iops_max=</span><iops><span>] [,iops_max_length=</span><seconds><span>] [,iops_rd=</span><iops><span>] [,iops_rd_max=</span><iops><span>] [,iops_rd_max_length=</span><seconds><span>] [,iops_wr=</span><iops><span>] [,iops_wr_max=</span><iops><span>] [,iops_wr_max_length=</span><seconds><span>] [,iothread=&lt;1|0&gt;] [,mbps=</span><mbps><span>] [,mbps_max=</span><mbps><span>] [,mbps_rd=</span><mbps><span>] [,mbps_rd_max=</span><mbps><span>] [,mbps_wr=</span><mbps><span>] [,mbps_wr_max=</span><mbps><span>] [,media=&lt;cdrom|disk&gt;] [,replicate=&lt;1|0&gt;] [,rerror=&lt;ignore|report|stop&gt;] [,ro=&lt;1|0&gt;] [,secs=</span><integer><span>] [,serial=</span><serial><span>] [,shared=&lt;1|0&gt;] [,size=</span><DiskSize><span>] [,snapshot=&lt;1|0&gt;] [,trans=&lt;none|lba|auto&gt;] [,werror=</span><enum><span>] --virtio[n] [file=] [，aio=] [，backup=&lt;1 |0&gt;] [，bps=] [，bps_max_length=] [，bps_rd=] [，bps_rd_max_length=] [，bps_wr=] [，bps_wr_max_length=] [，cache=] [，cyls=] [，detect_zeroes=&lt;1 |0&gt;] [，discard=] [，format=] [，heads=] [，import-from=] [，iops=] [，iops_max=] [，iops_max_length=] [，iops_rd=] [，iops_rd_max=] [，iops_rd_max_length=] </span>[<span>，iops_wr=</span>][，iops_wr_max=]<span> [，iops_wr_max_length=] [，iothread=&lt;1 |0&gt;] [，mbps=] [，mbps_max=] [，mbps_rd=] [，mbps_rd_max=] [，mbps_wr=] [，mbps_wr_max=] [，media=] [，replicate=&lt;1 |0&gt;] [，rerror=] [，ro=&lt;1 |0&gt;] [，secs=] [，serial=] [，shared=&lt;1 |0&gt;] [，size=] [，snapshot=&lt;1 |0&gt;] [，trans=] [，werror=]</span></p><p><span>Use volume as VIRTIO hard disk (n is 0 to 15). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the </span><em><span>import-from</span></em><span> parameter to import from an existing volume. 使用卷作为 VIRTIO 硬盘（n 为 0 到 15）。使用特殊语法 STORAGE_ID：SIZE_IN_GiB 分配新卷。使用 STORAGE_ID：0 和 </span><em><span>import-from</span></em><span> 参数从现有卷导入。</span></p></li><li><p><span>--vmgenid </span><UUID><span> (</span><em><span>default =</span></em><span> 1 (autogenerated)) --vmgenid </span><UUID><span>（</span><em><span>默认值 =</span></em><span> 1（自动生成））</span></p><p><span>Set VM Generation ID. Use </span><em><span>1</span></em><span> to autogenerate on create or update, pass </span><em><span>0</span></em><span> to disable explicitly. 设置 VM 生成 ID。使用 </span><em><span>1</span></em><span> 在创建或更新时自动生成，使用 </span><em><span>0</span></em><span> 显式禁用。</span></p></li><li><p><span>--vmstatestorage </span><storage ID><span> --vmstatestorage &lt;存储 ID&gt;</span></p><p><span>Default storage for VM state volumes/files. VM 状态卷/文件的默认存储。</span></p></li><li><p><span>--watchdog [[model=]&lt;i6300esb|ib700&gt;] [,action=</span><enum><span>] --看门狗 [[model=]&lt;i6300esb|ib700&gt;] [，action=</span><enum><span>]</span></p><p><span>Create a virtual hardware watchdog device. 创建虚拟硬件看门狗设备。</span></p></li></ul><p><strong><span>qm delsnapshot</span></strong><span> </span><vmid><span> </span><snapname><span> [OPTIONS]</span>
<strong><span>qm delsnapshot</span></strong><span> </span><vmid><span> </span><snapname><span> [选项]</span></p><p><span>Delete a VM snapshot. 删除 VM 快照。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><snapname><span>: </span><string><span> </span><snapname><span>： </span><string></p><p><span>The name of the snapshot. 快照的名称。</span></p></li><li><p><span>--force </span><boolean></p><p><span>For removal from config file, even if removing disk snapshots fails. 用于从配置文件中删除，即使删除磁盘快照失败。</span></p></li></ul><p><strong><span>qm destroy</span></strong><span> </span><vmid><span> [OPTIONS]</span>
<strong><span>qm destroy</span></strong><span> </span><vmid><span> [选项]</span></p><p><span>Destroy the VM and all used/owned volumes. Removes any VM specific permissions and firewall rules</span>
<span>销毁 VM 和所有已用/拥有的卷。删除任何特定于 VM 的权限和防火墙规则</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><span>--destroy-unreferenced-disks </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --destroy-unreferenced-disks </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>If set, destroy additionally all disks not referenced in the config but with a matching VMID from all enabled storages. 如果设置了，则从所有已启用的存储中额外销毁配置中未引用但具有匹配 VMID 的所有磁盘。</span></p></li><li><p><span>--purge </span><boolean><span> --清除 </span><boolean></p><p><span>Remove VMID from configurations, like backup &amp; replication jobs and HA. 从配置中删除 VMID，例如备份和复制作业以及 HA。</span></p></li><li><p><span>--skiplock </span><boolean></p><p><span>Ignore locks - only root is allowed to use this option. 忽略锁 - 只允许 root 使用此选项。</span></p></li></ul><p><strong><span>qm disk import</span></strong><span> </span><vmid><span> </span><source><span> </span><storage><span> [OPTIONS]</span>
<strong><span>qm 磁盘导入</span></strong><span> </span><vmid><span> </span><source><span> </span><storage><span> [选项]</span></p><p><span>Import an external disk image as an unused disk in a VM. The image format has to be supported by qemu-img(1).</span>
<span>将外部磁盘映像导入为 VM 中未使用的磁盘。qemu-img（1） 必须支持图像格式。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><source><span>: </span><string><span> </span><source><span>： </span><string></p><p><span>Path to the disk image to import 要导入的磁盘映像的路径</span></p></li><li><p><storage><span>: </span><storage ID><span> &lt;存储&gt;： &lt;存储ID&gt;</span></p><p><span>Target storage ID 目标存储 ID</span></p></li><li><p><span>--format &lt;qcow2 | raw | vmdk&gt;</span></p><p><span>Target format 目标格式</span></p></li></ul><p><strong><span>qm disk move</span></strong><span> </span><vmid><span> </span><disk><span> [</span><storage><span>] [OPTIONS]</span>
<strong><span>qm 磁盘移动</span></strong><span> </span><vmid><span> </span><disk><span> [</span><storage><span>] [选项]</span></p><p><span>Move volume to different storage or to a different VM.</span>
<span>将卷移动到不同的存储或不同的 VM。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><disk><span>: &lt;efidisk0 | ide0 | ide1 | ide2 | ide3 | sata0 | sata1 | sata2 | sata3 | sata4 | sata5 | scsi0 | scsi1 | scsi10 | scsi11 | scsi12 | scsi13 | scsi14 | scsi15 | scsi16 | scsi17 | scsi18 | scsi19 | scsi2 | scsi20 | scsi21 | scsi22 | scsi23 | scsi24 | scsi25 | scsi26 | scsi27 | scsi28 | scsi29 | scsi3 | scsi30 | scsi4 | scsi5 | scsi6 | scsi7 | scsi8 | scsi9 | tpmstate0 | unused0 | unused1 | unused10 | unused100 | unused101 | unused102 | unused103 | unused104 | unused105 | unused106 | unused107 | unused108 | unused109 | unused11 | unused110 | unused111 | unused112 | unused113 | unused114 | unused115 | unused116 | unused117 | unused118 | unused119 | unused12 | unused120 | unused121 | unused122 | unused123 | unused124 | unused125 | unused126 | unused127 | unused128 | unused129 | unused13 | unused130 | unused131 | unused132 | unused133 | unused134 | unused135 | unused136 | unused137 | unused138 | unused139 | unused14 | unused140 | unused141 | unused142 | unused143 | unused144 | unused145 | unused146 | unused147 | unused148 | unused149 | unused15 | unused150 | unused151 | unused152 | unused153 | unused154 | unused155 | unused156 | unused157 | unused158 | unused159 | unused16 | unused160 | unused161 | unused162 | unused163 | unused164 | unused165 | unused166 | unused167 | unused168 | unused169 | unused17 | unused170 | unused171 | unused172 | unused173 | unused174 | unused175 | unused176 | unused177 | unused178 | unused179 | unused18 | unused180 | unused181 | unused182 | unused183 | unused184 | unused185 | unused186 | unused187 | unused188 | unused189 | unused19 | unused190 | unused191 | unused192 | unused193 | unused194 | unused195 | unused196 | unused197 | unused198 | unused199 | unused2 | unused20 | unused200 | unused201 | unused202 | unused203 | unused204 | unused205 | unused206 | unused207 | unused208 | unused209 | unused21 | unused210 | unused211 | unused212 | unused213 | unused214 | unused215 | unused216 | unused217 | unused218 | unused219 | unused22 | unused220 | unused221 | unused222 | unused223 | unused224 | unused225 | unused226 | unused227 | unused228 | unused229 | unused23 | unused230 | unused231 | unused232 | unused233 | unused234 | unused235 | unused236 | unused237 | unused238 | unused239 | unused24 | unused240 | unused241 | unused242 | unused243 | unused244 | unused245 | unused246 | unused247 | unused248 | unused249 | unused25 | unused250 | unused251 | unused252 | unused253 | unused254 | unused255 | unused26 | unused27 | unused28 | unused29 | unused3 | unused30 | unused31 | unused32 | unused33 | unused34 | unused35 | unused36 | unused37 | unused38 | unused39 | unused4 | unused40 | unused41 | unused42 | unused43 | unused44 | unused45 | unused46 | unused47 | unused48 | unused49 | unused5 | unused50 | unused51 | unused52 | unused53 | unused54 | unused55 | unused56 | unused57 | unused58 | unused59 | unused6 | unused60 | unused61 | unused62 | unused63 | unused64 | unused65 | unused66 | unused67 | unused68 | unused69 | unused7 | unused70 | unused71 | unused72 | unused73 | unused74 | unused75 | unused76 | unused77 | unused78 | unused79 | unused8 | unused80 | unused81 | unused82 | unused83 | unused84 | unused85 | unused86 | unused87 | unused88 | unused89 | unused9 | unused90 | unused91 | unused92 | unused93 | unused94 | unused95 | unused96 | unused97 | unused98 | unused99 | virtio0 | virtio1 | virtio10 | virtio11 | virtio12 | virtio13 | virtio14 | virtio15 | virtio2 | virtio3 | virtio4 | virtio5 | virtio6 | virtio7 | virtio8 | virtio9&gt; </span><disk><span>：</span></p><p><span>The disk you want to move. 要移动的磁盘。</span></p></li><li><p><storage><span>: </span><storage ID><span> &lt;存储&gt;： &lt;存储ID&gt;</span></p><p><span>Target storage. 目标存储。</span></p></li><li><p><span>--bwlimit </span><integer><span> (0 - N) (</span><em><span>default =</span></em><span> move limit from datacenter or storage config) --bwlimit </span><integer><span> （0 - N） （</span><em><span>默认值 =</span></em><span> 从数据中心或存储配置移动限制）</span></p><p><span>Override I/O bandwidth limit (in KiB/s). 覆盖 I/O 带宽限制（以 KiB/s 为单位）。</span></p></li><li><p><span>--delete </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --delete </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Delete the original disk after successful copy. By default the original disk is kept as unused disk. 复制成功后删除原始磁盘。默认情况下，原始磁盘将保留为未使用的磁盘。</span></p></li><li><p><span>--digest </span><string></p><p><span>Prevent changes if current configuration file has different SHA1&quot; .&quot; digest. This can be used to prevent concurrent modifications. 如果当前配置文件具有不同的 SHA1“ .” 摘要，则防止更改。这可用于防止并发修改。</span></p></li><li><p><span>--format &lt;qcow2 | raw | vmdk&gt;</span></p><p><span>Target Format. 目标格式。</span></p></li><li><p><span>--target-digest </span><string></p><p><span>Prevent changes if the current config file of the target VM has a&quot; .&quot; different SHA1 digest. This can be used to detect concurrent modifications. 如果目标 VM 的当前配置文件具有“ .”不同的 SHA1 摘要，则阻止更改。这可用于检测并发修改。</span></p></li><li><p><span>--target-disk --目标磁盘 &lt;efidisk0 | ide0 | ide1 | ide2 | ide3 | sata0 | sata1 | sata2 | sata3 | sata4 | sata5 | scsi0 | scsi1 | scsi10 | scsi11 | scsi12 | scsi13 | scsi14 | scsi15 | scsi16 | scsi17 | scsi18 | scsi19 | scsi2 | scsi20 | scsi21 | scsi22 | scsi23 | scsi24 | scsi25 | scsi26 | scsi27 | scsi28 | scsi29 | scsi3 | scsi30 | scsi4 | scsi5 | scsi6 | scsi7 | scsi8 | scsi9 | tpmstate0 | unused0 | unused1 | unused10 | unused100 | unused101 | unused102 | unused103 | unused104 | unused105 | unused106 | unused107 | unused108 | unused109 | unused11 | unused110 | unused111 | unused112 | unused113 | unused114 | unused115 | unused116 | unused117 | unused118 | unused119 | unused12 | unused120 | unused121 | unused122 | unused123 | unused124 | unused125 | unused126 | unused127 | unused128 | unused129 | unused13 | unused130 | unused131 | unused132 | unused133 | unused134 | unused135 | unused136 | unused137 | unused138 | unused139 | unused14 | unused140 | unused141 | unused142 | unused143 | unused144 | unused145 | unused146 | unused147 | unused148 | unused149 | unused15 | unused150 | unused151 | unused152 | unused153 | unused154 | unused155 | unused156 | unused157 | unused158 | unused159 | unused16 | unused160 | unused161 | unused162 | unused163 | unused164 | unused165 | unused166 | unused167 | unused168 | unused169 | unused17 | unused170 | unused171 | unused172 | unused173 | unused174 | unused175 | unused176 | unused177 | unused178 | unused179 | unused18 | unused180 | unused181 | unused182 | unused183 | unused184 | unused185 | unused186 | unused187 | unused188 | unused189 | unused19 | unused190 | unused191 | unused192 | unused193 | unused194 | unused195 | unused196 | unused197 | unused198 | unused199 | unused2 | unused20 | unused200 | unused201 | unused202 | unused203 | unused204 | unused205 | unused206 | unused207 | unused208 | unused209 | unused21 | unused210 | unused211 | unused212 | unused213 | unused214 | unused215 | unused216 | unused217 | unused218 | unused219 | unused22 | unused220 | unused221 | unused222 | unused223 | unused224 | unused225 | unused226 | unused227 | unused228 | unused229 | unused23 | unused230 | unused231 | unused232 | unused233 | unused234 | unused235 | unused236 | unused237 | unused238 | unused239 | unused24 | unused240 | unused241 | unused242 | unused243 | unused244 | unused245 | unused246 | unused247 | unused248 | unused249 | unused25 | unused250 | unused251 | unused252 | unused253 | unused254 | unused255 | unused26 | unused27 | unused28 | unused29 | unused3 | unused30 | unused31 | unused32 | unused33 | unused34 | unused35 | unused36 | unused37 | unused38 | unused39 | unused4 | unused40 | unused41 | unused42 | unused43 | unused44 | unused45 | unused46 | unused47 | unused48 | unused49 | unused5 | unused50 | unused51 | unused52 | unused53 | unused54 | unused55 | unused56 | unused57 | unused58 | unused59 | unused6 | unused60 | unused61 | unused62 | unused63 | unused64 | unused65 | unused66 | unused67 | unused68 | unused69 | unused7 | unused70 | unused71 | unused72 | unused73 | unused74 | unused75 | unused76 | unused77 | unused78 | unused79 | unused8 | unused80 | unused81 | unused82 | unused83 | unused84 | unused85 | unused86 | unused87 | unused88 | unused89 | unused9 | unused90 | unused91 | unused92 | unused93 | unused94 | unused95 | unused96 | unused97 | unused98 | unused99 | virtio0 | virtio1 | virtio10 | virtio11 | virtio12 | virtio13 | virtio14 | virtio15 | virtio2 | virtio3 | virtio4 | virtio5 | virtio6 | virtio7 | virtio8 | virtio9&gt;</span></p><p><span>The config key the disk will be moved to on the target VM (for example, ide0 or scsi1). Default is the source disk key. 磁盘将移动到目标 VM 上的配置键（例如，ide0 或 scsi1）。默认值为源磁盘密钥。</span></p></li><li><p><span>--target-vmid </span><integer><span> (100 - 999999999) --target-vmid </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li></ul><p><strong><span>qm disk rescan</span></strong><span> [OPTIONS]</span>
<strong><span>QM 磁盘重新扫描</span></strong><span> [选项]</span></p><p><span>Rescan all storages and update disk sizes and unused disk images.</span>
<span>重新扫描所有存储并更新磁盘大小和未使用的磁盘映像。</span></p><ul><li><p><span>--dryrun </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --dryrun </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Do not actually write changes out to VM config(s). 实际上不要将更改写出到 VM 配置中。</span></p></li><li><p><span>--vmid </span><integer><span> (100 - 999999999) --vmid </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li></ul><p><strong><span>qm disk resize</span></strong><span> </span><vmid><span> </span><disk><span> </span><size><span> [OPTIONS]</span>
<strong><span>qm 磁盘调整大小</span></strong><span> </span><vmid><span> </span><disk><span> </span><size><span> [选项]</span></p><p><span>Extend volume size. 扩展卷大小。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><disk><span>: &lt;efidisk0 | ide0 | ide1 | ide2 | ide3 | sata0 | sata1 | sata2 | sata3 | sata4 | sata5 | scsi0 | scsi1 | scsi10 | scsi11 | scsi12 | scsi13 | scsi14 | scsi15 | scsi16 | scsi17 | scsi18 | scsi19 | scsi2 | scsi20 | scsi21 | scsi22 | scsi23 | scsi24 | scsi25 | scsi26 | scsi27 | scsi28 | scsi29 | scsi3 | scsi30 | scsi4 | scsi5 | scsi6 | scsi7 | scsi8 | scsi9 | tpmstate0 | virtio0 | virtio1 | virtio10 | virtio11 | virtio12 | virtio13 | virtio14 | virtio15 | virtio2 | virtio3 | virtio4 | virtio5 | virtio6 | virtio7 | virtio8 | virtio9&gt; </span><disk><span>：</span></p><p><span>The disk you want to resize. 要调整大小的磁盘。</span></p></li><li><p><size><span>: </span><span>+</span><span>?\d+(</span><span>.</span><span>\d+)?[KMGT]? </span><size><span>： </span><span>+</span><span>？\d+（</span><span>.</span><span>\d+）？[KMGT]？</span></p><p><span>The new size. With the + sign the value is added to the actual size of the volume and without it, the value is taken as an absolute one. Shrinking disk size is not supported. 新尺寸。使用 + 号时，该值将添加到体积的实际大小时，如果没有 + 号，该值将被视为绝对值。不支持缩小磁盘大小。</span></p></li><li><p><span>--digest </span><string></p><p><span>Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications. 如果当前配置文件具有不同的 SHA1 摘要，则防止更改。这可用于防止并发修改。</span></p></li><li><p><span>--skiplock </span><boolean></p><p><span>Ignore locks - only root is allowed to use this option. 忽略锁 - 只允许 root 使用此选项。</span></p></li></ul><p><strong><span>qm disk unlink</span></strong><span> </span><vmid><span> --idlist </span><string><span> [OPTIONS]</span>
<strong><span>qm 磁盘取消链接</span></strong><span> </span><vmid><span> --idlist </span><string><span> [选项]</span></p><p><span>Unlink/delete disk images.</span>
<span>取消链接/删除磁盘映像。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><span>--force </span><boolean></p><p><span>Force physical removal. Without this, we simple remove the disk from the config file and create an additional configuration entry called </span><em><span>unused[n]</span></em><span>, which contains the volume ID. Unlink of unused[n] always cause physical removal. 强制物理移除。如果没有这个，我们只需从配置文件中删除磁盘，并创建一个名为 </span><em><span>unused[n]</span></em><span> 的附加配置条目，其中包含卷 ID。 取消未使用的 [n] 链接总是会导致物理删除。</span></p></li><li><p><span>--idlist </span><string></p><p><span>A list of disk IDs you want to delete. 要删除的磁盘 ID 列表。</span></p></li></ul><p><strong><span>qm guest cmd</span></strong><span> </span><vmid><span> </span><command></p><p><span>Execute QEMU Guest Agent commands.</span>
<span>执行 QEMU Guest Agent 命令。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><command><span>: &lt;fsfreeze-freeze | fsfreeze-status | fsfreeze-thaw | fstrim | get-fsinfo | get-host-name | get-memory-block-info | get-memory-blocks | get-osinfo | get-time | get-timezone | get-users | get-vcpus | info | network-get-interfaces | ping | shutdown | suspend-disk | suspend-hybrid | suspend-ram&gt; </span><command><span>： &lt;fsfreeze-freeze | fsfreeze-status | fsfreeze-thaw | fstrim | get-fsinfo | get-host-name | get-memory-block-info | get-memory-blocks | get-osinfo | get-time | get-timezone | get-users | get-vcpus | info | network-get-interfaces | ping | shutdown | suspend-disk | suspend-hybrid | suspend-ram&gt;</span></p><p><span>The QGA command. QGA 命令。</span></p></li></ul><p><strong><span>qm guest exec</span></strong><span> </span><vmid><span> [</span><extra-args><span>] [OPTIONS]</span>
<strong><span>qm guest exec</span></strong><span> </span><vmid><span> [</span><extra-args><span>] [选项]</span></p><p><span>Executes the given command via the guest agent</span>
<span>通过客户机代理执行给定的命令</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><extra-args><span>: </span><array><span> </span><extra-args><span>： </span><array></p><p><span>Extra arguments as array 作为数组的额外参数</span></p></li><li><p><span>--pass-stdin </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --pass-stdin </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>When set, read STDIN until EOF and forward to guest agent via </span><em><span>input-data</span></em><span> (usually treated as STDIN to process launched by guest agent). Allows maximal 1 MiB. 设置后，读取 STDIN 直到 EOF 并通过</span><em><span>输入数据</span></em><span>转发到客户代理（通常被视为 STDIN 以处理客户代理启动的流程）。允许最大 1 MiB。</span></p></li><li><p><span>--synchronous </span><boolean><span> (</span><em><span>default =</span></em><span> 1) --synchronous </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>If set to off, returns the pid immediately instead of waiting for the commmand to finish or the timeout. 如果设置为 off，则立即返回 pid，而不是等待命令完成或超时。</span></p></li><li><p><span>--timeout </span><integer><span> (0 - N) (</span><em><span>default =</span></em><span> 30) --timeout </span><integer><span> （0 - N） （</span><em><span>默认值 =</span></em><span> 30）</span></p><p><span>The maximum time to wait synchronously for the command to finish. If reached, the pid gets returned. Set to 0 to deactivate 同步等待命令完成的最长时间。如果达到，则返回 pid。设置为 0 可停用</span></p></li></ul><p><strong><span>qm guest exec-status</span></strong><span> </span><vmid><span> </span><pid></p><p><span>Gets the status of the given pid started by the guest-agent</span>
<span>获取由 guest-agent 启动的给定 pid 的状态</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><pid><span>: </span><integer><span> </span><pid><span>： </span><integer></p><p><span>The PID to query 要查询的 PID</span></p></li></ul><p><strong><span>qm guest passwd</span></strong><span> </span><vmid><span> </span><username><span> [OPTIONS]</span>
<strong><span>qm guest passwd</span></strong><span> </span><vmid><span> </span><username><span> [选项]</span></p><p><span>Sets the password for the given user to the given password</span>
<span>将给定用户的密码设置为给定的密码</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><username><span>: </span><string><span> &lt;用户名&gt;： </span><string></p><p><span>The user to set the password for. 要为其设置密码的用户。</span></p></li><li><p><span>--crypted </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --crypted </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>set to 1 if the password has already been passed through crypt() 如果密码已通过 crypt（） 传递，则设置为 1</span></p></li></ul><p><strong><span>qm help</span></strong><span> [OPTIONS]</span>
<strong><span>qm help</span></strong><span> [选项]</span></p><p><span>Get help about specified command.</span>
<span>获取有关指定命令的帮助。</span></p><ul><li><p><span>--extra-args </span><array></p><p><span>Shows help for a specific command 显示特定命令的帮助</span></p></li><li><p><span>--verbose </span><boolean><span> --详细 </span><boolean></p><p><span>Verbose output format. 详细的输出格式。</span></p></li></ul><p><strong><span>qm import</span></strong><span> </span><vmid><span> </span><source><span> --storage </span><string><span> [OPTIONS]</span>
<strong><span>qm import</span></strong><span> </span><vmid><span> </span><source><span> --storage </span><string><span> [选项]</span></p><p><span>Import a foreign virtual guest from a supported import source, such as an ESXi storage.</span>
<span>从受支持的导入源（例如 ESXi 存储）导入外部虚拟客户机。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><source><span>: </span><string><span> </span><source><span>： </span><string></p><p><span>The import source volume id. 导入源卷 ID。</span></p></li><li><p><span>--acpi </span><boolean><span> (</span><em><span>default =</span></em><span> 1) --acpi </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>Enable/disable ACPI. 启用/禁用 ACPI。</span></p></li><li><p><span>--affinity </span><string><span> --亲和力 </span><string></p><p><span>List of host cores used to execute guest processes, for example: 0,5,8-11 用于执行客户机进程的主机核心列表，例如：0,5,8-11</span></p></li><li><p><span>--agent [enabled=]&lt;1|0&gt; [,freeze-fs-on-backup=&lt;1|0&gt;] [,fstrim_cloned_disks=&lt;1|0&gt;] [,type=&lt;virtio|isa&gt;] --agent [enabled=]&lt;1|0&gt; [，freeze-fs-on-backup=&lt;1|0&gt;] [，fstrim_cloned_disks=&lt;1|0&gt;] [，type=&lt;virtio|isa&gt;]</span></p><p><span>Enable/disable communication with the QEMU Guest Agent and its properties. 启用/禁用与 QEMU Guest Agent 及其属性的通信。</span></p></li><li><p><span>--arch &lt;aarch64 | x86_64&gt;</span></p><p><span>Virtual processor architecture. Defaults to the host. 虚拟处理器体系结构。默认为主机。</span></p></li><li><p><span>--args </span><string></p><p><span>Arbitrary arguments passed to kvm. 传递给 KVM 的任意参数。</span></p></li><li><p><span>--audio0 device=&lt;ich9-intel-hda|intel-hda|AC97&gt; [,driver=&lt;spice|none&gt;] --audio0 device=&lt;ich9-intel-had|intel-had|AC97&gt; [，驱动程序=&lt;spice|none&gt;]</span></p><p><span>Configure a audio device, useful in combination with QXL/Spice. 配置音频设备，与 QXL/Spice 结合使用很有用。</span></p></li><li><p><span>--autostart </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --autostart </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Automatic restart after crash (currently ignored). 崩溃后自动重启（当前忽略）。</span></p></li><li><p><span>--balloon </span><integer><span> (0 - N) --气球 </span><integer><span> （0 - N）</span></p><p><span>Amount of target RAM for the VM in MiB. Using zero disables the ballon driver. VM 的目标 RAM 量（以 MiB 为单位）。使用零将禁用气球驱动器。</span></p></li><li><p><span>--bios &lt;ovmf | seabios&gt; (</span><em><span>default =</span></em><span> seabios) --bios &lt;ovmf | seabios&gt;（</span><em><span>默认值 =</span></em><span> seabios）</span></p><p><span>Select BIOS implementation. 选择 BIOS 实现。</span></p></li><li><p><span>--boot [[legacy=]&lt;[acdn]{1,4}&gt;] [,order=&lt;device[;device...]&gt;] --boot [[legacy=]&lt;[acdn]{1,4}&gt;] [，order=&lt;device[;设备...]&gt;]</span></p><p><span>Specify guest boot order. Use the </span><em><span>order=</span></em><span> sub-property as usage with no key or </span><em><span>legacy=</span></em><span> is deprecated. 指定客户机启动顺序。使用 </span><em><span>order=</span></em><span> 子属性，因为不带键或 </span><em><span>legacy=</span></em><span> 的用法已弃用。</span></p></li><li><p><span>--bootdisk (ide|sata|scsi|virtio)\d+ --bootdisk （IDE|SATA|SCSI|virtio）\d+</span></p><p><span>Enable booting from specified disk. Deprecated: Use </span><em><span>boot: order=foo;bar</span></em><span> instead. 启用从指定磁盘启动。已弃用：使用 </span><em><span>boot： order=foo;条</span></em><span>形图。</span></p></li><li><p><span>--cdrom </span><volume><span> --cdrom &lt;卷&gt;</span></p><p><span>This is an alias for option -ide2 这是选项 -ide2 的别名</span></p></li><li><p><span>--cicustom [meta=</span><volume><span>] [,network=</span><volume><span>] [,user=</span><volume><span>] [,vendor=</span><volume><span>] --cicustom [meta=</span><volume><span>] [，network=</span><volume><span>] [，user=</span><volume><span>] [，vendor=</span><volume><span>]</span></p><p><span>cloud-init: Specify custom files to replace the automatically generated ones at start. cloud-init：指定自定义文件以替换开始时自动生成的文件。</span></p></li><li><p><span>--cipassword </span><string></p><p><span>cloud-init: Password to assign the user. Using this is generally not recommended. Use ssh keys instead. Also note that older cloud-init versions do not support hashed passwords. cloud-init：用于分配用户的密码。通常不建议使用此工具。请改用 ssh 密钥。另请注意，较旧的 cloud-init 版本不支持哈希密码。</span></p></li><li><p><span>--citype &lt;configdrive2 | nocloud | opennebula&gt;</span></p><p><span>Specifies the cloud-init configuration format. The default depends on the configured operating system type (ostype. We use the nocloud format for Linux, and configdrive2 for windows. 指定 cloud-init 配置格式。默认值取决于配置的操作系统类型 （ostype.我们对 Linux 使用 nocloud 格式，对 Windows 使用 configdrive2 格式。</span></p></li><li><p><span>--ciupgrade </span><boolean><span> (</span><em><span>default =</span></em><span> 1) --ciupgrade </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>cloud-init: do an automatic package upgrade after the first boot. cloud-init：首次启动后自动升级包。</span></p></li><li><p><span>--ciuser </span><string></p><p><span>cloud-init: User name to change ssh keys and password for instead of the image’s configured default user. cloud-init：用于更改 ssh 密钥和密码的用户名，而不是镜像配置的默认用户。</span></p></li><li><p><span>--cores </span><integer><span> (1 - N) (</span><em><span>default =</span></em><span> 1) --cores </span><integer><span> （1 - N） （</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>The number of cores per socket. 每个插槽的核心数。</span></p></li><li><p><span>--cpu [[cputype=]</span><string><span>] [,flags=&lt;+FLAG[;-FLAG...]&gt;] [,hidden=&lt;1|0&gt;] [,hv-vendor-id=</span><vendor-id><span>] [,phys-bits=&lt;8-64|host&gt;] [,reported-model=</span><enum><span>] --cpu [[cputype=]</span><string><span>] [，flags=&lt;+FLAG[;-FLAG...]&gt;] [，hidden=&lt;1|0&gt;] [，hv-vendor-id=</span><vendor-id><span>] [，phys-bits=&lt;8-64|host&gt;] [，reported-model=</span><enum><span>]</span></p><p><span>Emulated CPU type. 模拟 CPU 类型。</span></p></li><li><p><span>--cpulimit </span><number><span> (0 - 128) (</span><em><span>default =</span></em><span> 0) --cpulimit </span><number><span> （0 - 128） （</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Limit of CPU usage. CPU 使用率限制。</span></p></li><li><p><span>--cpuunits </span><integer><span> (1 - 262144) (</span><em><span>default =</span></em><span> cgroup v1: 1024, cgroup v2: 100) --cpuunits </span><integer><span> （1 - 262144） （</span><em><span>默认值 =</span></em><span> cgroup v1： 1024， cgroup v2： 100）</span></p><p><span>CPU weight for a VM, will be clamped to [1, 10000] in cgroup v2. 在 cgroup v2 中，VM 的 CPU 权重将限制为 [1， 10000]。</span></p></li><li><p><span>--delete </span><string><span> --删除 </span><string></p><p><span>A list of settings you want to delete. 要删除的设置列表。</span></p></li><li><p><span>--description </span><string></p><p><span>Description for the VM. Shown in the web-interface VM’s summary. This is saved as comment inside the configuration file. VM 的说明。显示在 Web 界面 VM 的摘要中。这将在配置文件中另存为注释。</span></p></li><li><p><span>--dryrun </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --dryrun </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Show the create command and exit without doing anything. 显示 create 命令并退出而不执行任何操作。</span></p></li><li><p><span>--efidisk0 [file=]</span><volume><span> [,efitype=&lt;2m|4m&gt;] [,format=</span><enum><span>] [,pre-enrolled-keys=&lt;1|0&gt;] [,size=</span><DiskSize><span>] --efidisk0 [file=]</span><volume><span> [，efitype=&lt;2m|4m&gt;] [，format=</span><enum><span>] [，pre-enrolled-keys=&lt;1|0&gt;] [，size=</span><DiskSize><span>]</span></p><p><span>Configure a disk for storing EFI vars. 配置用于存储 EFI var 的磁盘。</span></p></li><li><p><span>--format &lt;qcow2 | raw | vmdk&gt;</span></p><p><span>Target format 目标格式</span></p></li><li><p><span>--freeze </span><boolean><span> --冻结 </span><boolean></p><p><span>Freeze CPU at startup (use </span><em><span>c</span></em><span> monitor command to start execution). 启动时冻结 CPU（使用 </span><em><span>c</span></em><span> monitor 命令开始执行）。</span></p></li><li><p><span>--hookscript </span><string></p><p><span>Script that will be executed during various steps in the vms lifetime. 将在 vms 生命周期的各个步骤中执行的脚本。</span></p></li><li><p><span>--hostpci[n] [[host=]&lt;HOSTPCIID[;HOSTPCIID2...]&gt;] [,device-id=</span><hex id><span>] [,legacy-igd=&lt;1|0&gt;] [,mapping=</span><mapping-id><span>] [,mdev=</span><string><span>] [,pcie=&lt;1|0&gt;] [,rombar=&lt;1|0&gt;] [,romfile=</span><string><span>] [,sub-device-id=</span><hex id><span>] [,sub-vendor-id=</span><hex id><span>] [,vendor-id=</span><hex id><span>] [,x-vga=&lt;1|0&gt;] --hostpci[n] [[host=]&lt;HOSTPCIID[;HOSTPCIID2...]&gt;] [，device-id=</span><hex id><span>] [，legacy-igd=&lt;1|0&gt;] [，mapping=</span><mapping-id><span>] [，mdev=</span><string><span>] [，pcie=&lt;1|0&gt;] [，rombar=&lt;1|0&gt;] [，romfile=</span><string><span>] [，sub-device-id=</span><hex id><span>] [，sub-vendor-id=</span><hex id><span>] [，vendor-id=</span><hex id><span>] [，x-vga=&lt;1|0&gt;]</span></p><p><span>Map host PCI devices into guest. 将主机 PCI 设备映射到客户机。</span></p></li><li><p><span>--hotplug </span><string><span> (</span><em><span>default =</span></em><span> network,disk,usb) --hotplug </span><string><span> （</span><em><span>默认 =</span></em><span> 网络，磁盘，usb）</span></p><p><span>Selectively enable hotplug features. This is a comma separated list of hotplug features: </span><em><span>network</span></em><span>, </span><em><span>disk</span></em><span>, </span><em><span>cpu</span></em><span>, </span><em><span>memory</span></em><span>, </span><em><span>usb</span></em><span> and </span><em><span>cloudinit</span></em><span>. Use </span><em><span>0</span></em><span> to disable hotplug completely. Using </span><em><span>1</span></em><span> as value is an alias for the default network,disk,usb. USB hotplugging is possible for guests with machine version &gt;= 7.1 and ostype l26 or windows &gt; 7. 有选择地启用热插拔功能。这是一个以逗号分隔的热插拔功能列表：</span><em><span>网络</span></em><span>、</span><em><span>磁盘</span></em><span>、</span><em><span>CPU</span></em><span>、</span><em><span>内存</span></em><span>、</span><em><span>USB</span></em><span> 和 </span><em><span>cloudinit</span></em><span>。使用 </span><em><span>0</span></em><span> 完全禁用热插拔。使用 </span><em><span>1</span></em><span> 作为值是默认网络、磁盘、USB 的别名。对于计算机版本 &gt;= 7.1 和 ostype l26 或 Windows &gt; 7 的乘客，可以使用 USB 热插拔。</span></p></li><li><p><span>--hugepages &lt;1024 | 2 | any&gt;</span></p><p><span>Enable/disable hugepages memory. 启用/禁用 hugepages 内存。</span></p></li><li><p><span>--ide[n] [file=]</span><volume><span> [,aio=&lt;native|threads|io_uring&gt;] [,backup=&lt;1|0&gt;] [,bps=</span><bps><span>] [,bps_max_length=</span><seconds><span>] [,bps_rd=</span><bps><span>] [,bps_rd_max_length=</span><seconds><span>] [,bps_wr=</span><bps><span>] [,bps_wr_max_length=</span><seconds><span>] [,cache=</span><enum><span>] [,cyls=</span><integer><span>] [,detect_zeroes=&lt;1|0&gt;] [,discard=&lt;ignore|on&gt;] [,format=</span><enum><span>] [,heads=</span><integer><span>] [,iops=</span><iops><span>] [,iops_max=</span><iops><span>] [,iops_max_length=</span><seconds><span>] [,iops_rd=</span><iops><span>] [,iops_rd_max=</span><iops><span>] [,iops_rd_max_length=</span><seconds><span>] [,iops_wr=</span><iops><span>] [,iops_wr_max=</span><iops><span>] [,iops_wr_max_length=</span><seconds><span>] [,mbps=</span><mbps><span>] [,mbps_max=</span><mbps><span>] [,mbps_rd=</span><mbps><span>] [,mbps_rd_max=</span><mbps><span>] [,mbps_wr=</span><mbps><span>] [,mbps_wr_max=</span><mbps><span>] [,media=&lt;cdrom|disk&gt;] [,model=</span><model><span>] [,replicate=&lt;1|0&gt;] [,rerror=&lt;ignore|report|stop&gt;] [,secs=</span><integer><span>] [,serial=</span><serial><span>] [,shared=&lt;1|0&gt;] [,size=</span><DiskSize><span>] [,snapshot=&lt;1|0&gt;] [,ssd=&lt;1|0&gt;] [,trans=&lt;none|lba|auto&gt;] [,werror=</span><enum><span>] [,wwn=</span><wwn><span>] --IDE[n] [file=] [，aio=] [，backup=&lt;1 |0&gt;] [，bps=] [，bps_max_length=] [，bps_rd=] [，bps_rd_max_length=] [，bps_wr=] [，bps_wr_max_length=] [，cache=] [，cyls=] [，detect_zeroes=&lt;1 |0&gt;] [，discard=] [，format=] [，heads=] [，iops=] [，iops_max=] [，iops_max_length=] [，iops_rd=] [，iops_rd_max=] [，iops_rd_max_length=] [，iops_wr=] [，iops_wr_max=] [，iops_wr_max_length=] [，mbps=] [，mbps_max=] [，mbps_rd=] [，mbps_rd_max=] [，mbps_wr=] [，mbps_wr_max=] [，media=] [，model=] [，replicate=&lt;1 |0&gt;] [，rerror=] [，secs=] [，serial=] [，shared=&lt;1 |0&gt;] [，size=] [，snapshot=&lt;1 |0&gt;] [，ssd&lt;1 |0&gt;=] [，trans=] [，werror=] [，wwn=]</span></p><p><span>Use volume as IDE hard disk or CD-ROM (n is 0 to 3). 使用卷作为 IDE 硬盘或 CD-ROM（n 为 0 到 3）。</span></p></li><li><p><span>--ipconfig[n] [gw=</span><GatewayIPv4><span>] [,gw6=</span><GatewayIPv6><span>] [,ip=&lt;IPv4Format/CIDR&gt;] [,ip6=&lt;IPv6Format/CIDR&gt;] --ipconfig[n] [gw=</span><GatewayIPv4><span>] [，gw6=</span><GatewayIPv6><span>] [，ip=&lt;IPv4Format/CIDR&gt;] [，ip6=&lt;IPv6Format/CIDR&gt;]</span></p><p><span>cloud-init: Specify IP addresses and gateways for the corresponding interface. cloud-init：指定对应接口的IP地址和网关。IP addresses use CIDR notation, gateways are optional but need an IP of the same type specified. IP 地址使用 CIDR 表示法，网关是可选的，但需要指定的相同类型的 IP。The special string </span><em><span>dhcp</span></em><span> can be used for IP addresses to use DHCP, in which case no explicit gateway should be provided. For IPv6 the special string </span><em><span>auto</span></em><span> can be used to use stateless autoconfiguration. This requires cloud-init 19.4 or newer. 特殊字符串 </span><em><span>dhcp</span></em><span> 可用于 IP 地址以使用 DHCP，在这种情况下，不应提供显式网关。对于 IPv6，可以使用特殊字符串 </span><em><span>auto</span></em><span> 来使用无状态自动配置。这需要 cloud-init 19.4 或更高版本。If cloud-init is enabled and neither an IPv4 nor an IPv6 address is specified, it defaults to using dhcp on IPv4. 如果启用了 cloud-init，且未指定 IPv4 和 IPv6 地址，则默认在 IPv4 上使用 dhcp。</span></p></li><li><p><span>--ivshmem size=</span><integer><span> [,name=</span><string><span>] --ivshmem size=</span><integer><span> [，name=</span><string><span>]</span></p><p><span>Inter-VM shared memory. Useful for direct communication between VMs, or to the host. 虚拟机间共享内存。对于虚拟机之间的直接通信或与主机的直接通信非常有用。</span></p></li><li><p><span>--keephugepages </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --keephugepages </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Use together with hugepages. If enabled, hugepages will not not be deleted after VM shutdown and can be used for subsequent starts. 与 hugepages 一起使用。如果启用，则 Hugepages 在 VM 关闭后不会被删除，并且可用于后续启动。</span></p></li><li><p><span>--keyboard &lt;da | de | de-ch | en-gb | en-us | es | fi | fr | fr-be | fr-ca | fr-ch | hu | is | it | ja | lt | mk | nl | no | pl | pt | pt-br | sl | sv | tr&gt; --keyboard &lt;da | de | de-ch | en-gb | en-us | es | fi | fr | fr-be | fr-ca | fr-ch | 胡 | 是 | it | ja | lt | mk | nl | no | pl | pt | pt-br | sl | sv | tr&gt;</span></p><p><span>Keyboard layout for VNC server. This option is generally not required and is often better handled from within the guest OS. VNC 服务器的键盘布局。此选项通常不是必需的，通常最好在客户机操作系统中处理。</span></p></li><li><p><span>--kvm </span><boolean><span> (</span><em><span>default =</span></em><span> 1) --kvm </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>Enable/disable KVM hardware virtualization. 启用/禁用 KVM 硬件虚拟化。</span></p></li><li><p><span>--live-import </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --live-import </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Immediately start the VM and copy the data in the background. 立即启动 VM 并在后台复制数据。</span></p></li><li><p><span>--localtime </span><boolean></p><p><span>Set the real time clock (RTC) to local time. This is enabled by default if the ostype indicates a Microsoft Windows OS. 将实时时钟 （RTC） 设置为本地时间。如果 ostype 指示 Microsoft Windows 操作系统，则默认情况下启用此功能。</span></p></li><li><p><span>--lock &lt;backup | clone | create | migrate | rollback | snapshot | snapshot-delete | suspended | suspending&gt; --lock &lt;备份 | 克隆 | 创建 | 迁移 | 回滚 | 快照 | 快照删除 | 已暂停 | 挂起&gt;</span></p><p><span>Lock/unlock the VM. 锁定/解锁 VM。</span></p></li><li><p><span>--machine [[type=]</span><machine type><span>] [,viommu=&lt;intel|virtio&gt;] --machine [[type=]</span><machine type><span>] [，viommu=&lt;intel|virtio&gt;]</span></p><p><span>Specify the QEMU machine. 指定 QEMU 机器。</span></p></li><li><p><span>--memory [current=]</span><integer><span> --内存 [current=]</span><integer></p><p><span>Memory properties. 内存属性。</span></p></li><li><p><span>--migrate_downtime </span><number><span> (0 - N) (</span><em><span>default =</span></em><span> 0.1) --migrate_downtime </span><number><span> （0 - N） （</span><em><span>默认值 =</span></em><span> 0.1）</span></p><p><span>Set maximum tolerated downtime (in seconds) for migrations. Should the migration not be able to converge in the very end, because too much newly dirtied RAM needs to be transferred, the limit will be increased automatically step-by-step until migration can converge. 为迁移设置允许的最大停机时间（以秒为单位）。如果迁移最终无法收敛，因为需要传输太多新污染的 RAM，则限制将自动逐步增加，直到迁移可以收敛。</span></p></li><li><p><span>--migrate_speed </span><integer><span> (0 - N) (</span><em><span>default =</span></em><span> 0) --migrate_speed </span><integer><span>（0 - N） （</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Set maximum speed (in MB/s) for migrations. Value 0 is no limit. 设置迁移的最大速度（以 MB/s 为单位）。值 0 没有限制。</span></p></li><li><p><span>--name </span><string></p><p><span>Set a name for the VM. Only used on the configuration web interface. 为 VM 设置名称。仅在配置 Web 界面上使用。</span></p></li><li><p><span>--nameserver </span><string></p><p><span>cloud-init: Sets DNS server IP address for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set. cloud-init：设置容器的DNS服务器IP地址。如果 searchdomain 和 nameserver 均未设置，Create 将自动使用主机的设置。</span></p></li><li><p><span>--net[n] [model=]</span><enum><span> [,bridge=</span><bridge><span>] [,firewall=&lt;1|0&gt;] [,link_down=&lt;1|0&gt;] [,macaddr=</span><a href='XX:XX:XX:XX:XX:XX' target='_blank' class='url'>XX:XX:XX:XX:XX:XX</a><span>] [,mtu=</span><integer><span>] [,queues=</span><integer><span>] [,rate=</span><number><span>] [,tag=</span><integer><span>] [,trunks=&lt;vlanid[;vlanid...]&gt;] [,</span><model><span>=</span><macaddr><span>] --net[n] [model=]</span><enum><span> [，bridge=</span><bridge><span>] [，firewall=&lt;1|0&gt;] [，link_down=&lt;1|0&gt;] [，macaddr=&lt;XX：XX：XX：XX：XX：XX&gt;] [，mtu=</span><integer><span>] [，queues=</span><integer><span>] [，rate=</span><number><span>] [，tag=</span><integer><span>] [，trunks=&lt;vlanid[;弗拉尼德...]&gt;] [，</span><model><span>=</span><macaddr><span>]</span></p><p><span>Specify network devices. 指定网络设备。</span></p></li><li><p><span>--numa </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --numa </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Enable/disable NUMA. 启用/禁用 NUMA。</span></p></li><li><p><span>--numa[n] cpus=&lt;id[-id];...&gt; [,hostnodes=&lt;id[-id];...&gt;] [,memory=</span><number><span>] [,policy=&lt;preferred|bind|interleave&gt;] --numa[n] cpus=&lt;id[-id];...&gt; [，hostnodes=&lt;id[-id];...&gt;] [，memory=</span><number><span>] [，policy=&lt;preferred|bind|interleave&gt;]</span></p><p><span>NUMA topology. NUMA 拓扑。</span></p></li><li><p><span>--onboot </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --onboot </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Specifies whether a VM will be started during system bootup. 指定在系统启动期间是否启动 VM。</span></p></li><li><p><span>--ostype &lt;l24 | l26 | other | solaris | w2k | w2k3 | w2k8 | win10 | win11 | win7 | win8 | wvista | wxp&gt; --ostype &lt;l24 | l26 | 其他 | Solaris | W2K | W2K3 | W2K8 | Win10 | Win11 | Win7 | Win8 | wvista | wxp&gt;</span></p><p><span>Specify guest operating system. 指定客户机操作系统。</span></p></li><li><p><span>--parallel[n] /dev/parport\d+|/dev/usb/lp\d+</span></p><p><span>Map host parallel devices (n is 0 to 2). 映射主机并行设备（n 为 0 到 2）。</span></p></li><li><p><span>--protection </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --protection </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Sets the protection flag of the VM. This will disable the remove VM and remove disk operations. 设置 VM 的保护标志。这将禁用删除 VM 和删除磁盘操作。</span></p></li><li><p><span>--reboot </span><boolean><span> (</span><em><span>default =</span></em><span> 1) --reboot </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>Allow reboot. If set to </span><em><span>0</span></em><span> the VM exit on reboot. 允许重新启动。如果设置为 </span><em><span>0</span></em><span>，则 VM 将在重新启动时退出。</span></p></li><li><p><span>--rng0 [source=]&lt;/dev/urandom|/dev/random|/dev/hwrng&gt; [,max_bytes=</span><integer><span>] [,period=</span><integer><span>] --rng0 [source=]&lt;/dev/urandom|/dev/random|/dev/hwrng&gt; [，max_bytes=</span><integer><span>] [，period=</span><integer><span>]</span></p><p><span>Configure a VirtIO-based Random Number Generator. 配置基于 VirtIO 的随机数生成器。</span></p></li><li><p><span>--sata[n] [file=]</span><volume><span> [,aio=&lt;native|threads|io_uring&gt;] [,backup=&lt;1|0&gt;] [,bps=</span><bps><span>] [,bps_max_length=</span><seconds><span>] [,bps_rd=</span><bps><span>] [,bps_rd_max_length=</span><seconds><span>] [,bps_wr=</span><bps><span>] [,bps_wr_max_length=</span><seconds><span>] [,cache=</span><enum><span>] [,cyls=</span><integer><span>] [,detect_zeroes=&lt;1|0&gt;] [,discard=&lt;ignore|on&gt;] [,format=</span><enum><span>] [,heads=</span><integer><span>] [,iops=</span><iops><span>] [,iops_max=</span><iops><span>] [,iops_max_length=</span><seconds><span>] [,iops_rd=</span><iops><span>] [,iops_rd_max=</span><iops><span>] [,iops_rd_max_length=</span><seconds><span>] [,iops_wr=</span><iops><span>] [,iops_wr_max=</span><iops><span>] [,iops_wr_max_length=</span><seconds><span>] [,mbps=</span><mbps><span>] [,mbps_max=</span><mbps><span>] [,mbps_rd=</span><mbps><span>] [,mbps_rd_max=</span><mbps><span>] [,mbps_wr=</span><mbps><span>] [,mbps_wr_max=</span><mbps><span>] [,media=&lt;cdrom|disk&gt;] [,replicate=&lt;1|0&gt;] [,rerror=&lt;ignore|report|stop&gt;] [,secs=</span><integer><span>] [,serial=</span><serial><span>] [,shared=&lt;1|0&gt;] [,size=</span><DiskSize><span>] [,snapshot=&lt;1|0&gt;] [,ssd=&lt;1|0&gt;] [,trans=&lt;none|lba|auto&gt;] [,werror=</span><enum><span>] [,wwn=</span><wwn><span>] --sata[n] [file=] [，aio=] [，backup=&lt;1 |0&gt;] [，bps=] [，bps_max_length=] [，bps_rd=] [，bps_rd_max_length=] [，bps_wr=] [，bps_wr_max_length=] [，cache=] [，cyls=] [，detect_zeroes=&lt;1 |0&gt;] [，discard=] [，format=] [，heads=] [，iops=] [，iops_max=] [，iops_max_length=] [，iops_rd=] [，iops_rd_max=] [，iops_rd_max_length=] [，iops_wr=] [，iops_wr_max=] [，iops_wr_max_length=] [，mbps=] [，mbps_max=] [，mbps_rd=] [，mbps_rd_max=] [，mbps_wr=] [，mbps_wr_max=] [，media=] [，&lt;1 |0&gt;replicate=] [，rerror=] [，secs=] [，serial=] [，shared=&lt;1 |0&gt;] [，size=] [，snapshot=&lt;1 |0&gt;] [，ssd=&lt;1 |0&gt;] [，trans=] [，werror=] [，wwn=]</span></p><p><span>Use volume as SATA hard disk or CD-ROM (n is 0 to 5). 使用卷作为 SATA 硬盘或 CD-ROM（n 为 0 到 5）。</span></p></li><li><p><span>--scsi[n] [file=]</span><volume><span> [,aio=&lt;native|threads|io_uring&gt;] [,backup=&lt;1|0&gt;] [,bps=</span><bps><span>] [,bps_max_length=</span><seconds><span>] [,bps_rd=</span><bps><span>] [,bps_rd_max_length=</span><seconds><span>] [,bps_wr=</span><bps><span>] [,bps_wr_max_length=</span><seconds><span>] [,cache=</span><enum><span>] [,cyls=</span><integer><span>] [,detect_zeroes=&lt;1|0&gt;] [,discard=&lt;ignore|on&gt;] [,format=</span><enum><span>] [,heads=</span><integer><span>] [,iops=</span><iops><span>] [,iops_max=</span><iops><span>] [,iops_max_length=</span><seconds><span>] [,iops_rd=</span><iops><span>] [,iops_rd_max=</span><iops><span>] [,iops_rd_max_length=</span><seconds><span>] [,iops_wr=</span><iops><span>] [,iops_wr_max=</span><iops><span>] [,iops_wr_max_length=</span><seconds><span>] [,iothread=&lt;1|0&gt;] [,mbps=</span><mbps><span>] [,mbps_max=</span><mbps><span>] [,mbps_rd=</span><mbps><span>] [,mbps_rd_max=</span><mbps><span>] [,mbps_wr=</span><mbps><span>] [,mbps_wr_max=</span><mbps><span>] [,media=&lt;cdrom|disk&gt;] [,product=</span><product><span>] [,queues=</span><integer><span>] [,replicate=&lt;1|0&gt;] [,rerror=&lt;ignore|report|stop&gt;] [,ro=&lt;1|0&gt;] [,scsiblock=&lt;1|0&gt;] [,secs=</span><integer><span>] [,serial=</span><serial><span>] [,shared=&lt;1|0&gt;] [,size=</span><DiskSize><span>] [,snapshot=&lt;1|0&gt;] [,ssd=&lt;1|0&gt;] [,trans=&lt;none|lba|auto&gt;] [,vendor=</span><vendor><span>] [,werror=</span><enum><span>] [,wwn=</span><wwn><span>] --scsi[n] [file=] [，aio=] [，backup=&lt;1 |0&gt;] [，bps=] [，bps_max_length=] [，bps_rd=] [，bps_rd_max_length=] [，bps_wr=] [，bps_wr_max_length=] [，cache=] [，cyls=] [，detect_zeroes=&lt;1 |0&gt;] [，discard=] [，format=] [，heads=] [，iops=] [，iops_max=] [，iops_max_length=] [，iops_rd=] [，iops_rd_max=] [，iops_rd_max_length=] [，iops_wr=] [，iops_wr_max=] [，iops_wr_max_length=] [，iothread=&lt;1 |0&gt;] [，mbps=] [，mbps_max=] [，mbps_rd=] [，mbps_rd_max=] [，mbps_wr=] [，mbps_wr_max=] [，media=] [，product=] [，queues=] [，replicate=&lt;1 |0&gt;] [，rerror=] [，ro=&lt;1 |0&gt;] [，scsiblock=&lt;1 |0&gt;] [，secs=] [，serial=] [，shared=&lt;1 |0&gt;] [，size=] [，snapshot=&lt;1 |0&gt;] [，ssd=&lt;1 |0&gt;] [，trans=] [，vendor=] [，werror=] [，wwn=]</span></p><p><span>Use volume as SCSI hard disk or CD-ROM (n is 0 to 30). 使用卷作为 SCSI 硬盘或 CD-ROM（n 为 0 到 30）。</span></p></li><li><p><span>--scsihw &lt;lsi | lsi53c810 | megasas | pvscsi | virtio-scsi-pci | virtio-scsi-single&gt; (</span><em><span>default =</span></em><span> lsi) --scsihw &lt;lsi | lsi53c810 | megasas | pvscsi | virtio-scsi-pci | virtio-scsi-single&gt;（</span><em><span>默认值 =</span></em><span> lsi）</span></p><p><span>SCSI controller model SCSI 控制器型号</span></p></li><li><p><span>--searchdomain </span><string></p><p><span>cloud-init: Sets DNS search domains for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set. cloud-init：设置容器的DNS搜索域。如果 searchdomain 和 nameserver 均未设置，Create 将自动使用主机的设置。</span></p></li><li><p><span>--serial[n] (/dev/.+|socket) --serial[n] （/dev/.+|套接字）</span></p><p><span>Create a serial device inside the VM (n is 0 to 3) 在 VM 内部创建串行设备（n 为 0 到 3）</span></p></li><li><p><span>--shares </span><integer><span> (0 - 50000) (</span><em><span>default =</span></em><span> 1000) --shares </span><integer><span> （0 - 50000） （</span><em><span>默认值 =</span></em><span> 1000）</span></p><p><span>Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. Number is relative to weights of all other running VMs. Using zero disables auto-ballooning. Auto-ballooning is done by pvestatd. 用于自动膨胀的内存份额量。数字越大，此 VM 获得的内存就越多。该数字与所有其他正在运行的 VM 的权重相关。使用零将禁用自动膨胀。自动气球是由 pvestatd 完成的。</span></p></li><li><p><span>--smbios1 [base64=&lt;1|0&gt;] [,family=</span><Base64 encoded string><span>] [,manufacturer=</span><Base64 encoded string><span>] [,product=</span><Base64 encoded string><span>] [,serial=</span><Base64 encoded string><span>] [,sku=</span><Base64 encoded string><span>] [,uuid=</span><UUID><span>] [,version=</span><Base64 encoded string><span>] --smbios1 [base64=&lt;1|0&gt;] [，family=&lt;Base64 编码字符串&gt;] [，manufacturer=&lt;Base64 编码字符串&gt;] [，product=&lt;Base64 编码字符串&gt;] [，serial=&lt;Base64 编码字符串&gt;] [，sku=&lt;Base64 编码字符串&gt;] [，uuid=</span><UUID><span>] [，version=&lt;Base64 编码字符串&gt;]</span></p><p><span>Specify SMBIOS type 1 fields. 指定 SMBIOS 类型 1 字段。</span></p></li><li><p><span>--smp </span><integer><span> (1 - N) (</span><em><span>default =</span></em><span> 1) --smp </span><integer><span> （1 - N） （</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>The number of CPUs. Please use option -sockets instead. CPU 的数量。请改用选项 -sockets。</span></p></li><li><p><span>--sockets </span><integer><span> (1 - N) (</span><em><span>default =</span></em><span> 1) --sockets </span><integer><span> （1 - N） （</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>The number of CPU sockets. CPU 插槽的数量。</span></p></li><li><p><span>--spice_enhancements [foldersharing=&lt;1|0&gt;] [,videostreaming=&lt;off|all|filter&gt;] --spice_enhancements [foldersharing=&lt;1|0&gt;] [，videostreaming=&lt;off|all|filter&gt;]</span></p><p><span>Configure additional enhancements for SPICE. 配置 SPICE 的其他增强功能。</span></p></li><li><p><span>--sshkeys </span><string><span> --sshkeys &lt;字符串&gt;</span></p><p><span>cloud-init: Setup public SSH keys (one key per line, OpenSSH format). cloud-init：设置公有 SSH 密钥（每行一个密钥，OpenSSH 格式）。</span></p></li><li><p><span>--startdate (now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS) (</span><em><span>default =</span></em><span> now) --startdate （现在 |YYYY-MM-DD |YYYY-MM-DDTHH：MM：SS） </span><em><span>（默认值 =</span></em><span> 现在）</span></p><p><span>Set the initial date of the real time clock. Valid format for date are:&#39;now&#39; or </span><em><span>2006-06-17T16:01:21</span></em><span> or </span><em><span>2006-06-17</span></em><span>. 设置实时时钟的初始日期。日期的有效格式为：“现在”或 </span><em><span>2006-06-17T16：01：21</span></em><span> 或 </span><em><span>2006-06-17</span></em><span>。</span></p></li><li><p><span>--startup </span><code>[[order=]\d+] [,up=\d+] [,down=\d+]</code><span> --startup &#39;[[订单=]\d+] [，up=\d+] [，down=\d+] &#39;</span></p><p><span>Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the </span><em><span>up</span></em><span> or </span><em><span>down</span></em><span> delay in seconds, which specifies a delay to wait before the next VM is started or stopped. 启动和关闭行为。Order 是一个非负数，用于定义一般启动顺序。通过反向排序完成关机。此外，还可以设置</span><em><span>启动</span></em><span>或</span><em><span>关闭</span></em><span>延迟（以秒为单位），这指定了在启动或停止下一个 VM 之前要等待的延迟。</span></p></li><li><p><span>--storage </span><storage ID><span> --storage &lt;存储 ID&gt;</span></p><p><span>Default storage. 默认存储。</span></p></li><li><p><span>--tablet </span><boolean><span> (</span><em><span>default =</span></em><span> 1) --tablet </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>Enable/disable the USB tablet device. 启用/禁用 USB 平板电脑设备。</span></p></li><li><p><span>--tags </span><string><span> --标签 </span><string></p><p><span>Tags of the VM. This is only meta information. VM 的标记。这只是元信息。</span></p></li><li><p><span>--tdf </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --tdf </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Enable/disable time drift fix. 启用/禁用时间漂移修复。</span></p></li><li><p><span>--template </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --template </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Enable/disable Template. 启用/禁用模板。</span></p></li><li><p><span>--tpmstate0 [file=]</span><volume><span> [,size=</span><DiskSize><span>] [,version=&lt;v1.2|v2.0&gt;] --tpmstate0 [file=]</span><volume><span> [，size=</span><DiskSize><span>] [，version=&lt;v1.2|v2.0&gt;]</span></p><p><span>Configure a Disk for storing TPM state. The format is fixed to </span><em><span>raw</span></em><span>. 配置用于存储 TPM 状态的磁盘。格式固定为</span><em><span>原始</span></em><span>格式。</span></p></li><li><p><span>--unused[n] [file=]</span><volume></p><p><span>Reference to unused volumes. This is used internally, and should not be modified manually. 对未使用卷的引用。这是在内部使用的，不应手动修改。</span></p></li><li><p><span>--usb[n] [[host=]&lt;HOSTUSBDEVICE|spice&gt;] [,mapping=</span><mapping-id><span>] [,usb3=&lt;1|0&gt;] --usb[n] [[host=]&lt;HOSTUSBDEVICE|spice&gt;] [，mapping=</span><mapping-id><span>] [，usb3=&lt;1|0&gt;]</span></p><p><span>Configure an USB device (n is 0 to 4, for machine version &gt;= 7.1 and ostype l26 or windows &gt; 7, n can be up to 14). 配置 USB 设备（n 为 0 到 4，对于计算机版本 &gt;= 7.1 和 ostype l26 或 Windows &gt; 7，n 最多为 14）。</span></p></li><li><p><span>--vcpus </span><integer><span> (1 - N) (</span><em><span>default =</span></em><span> 0) --vcpus </span><integer><span> （1 - N） （</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Number of hotplugged vcpus. 热插拔的 vCPU 数量。</span></p></li><li><p><span>--vga [[type=]</span><enum><span>] [,clipboard=</span><vnc><span>] [,memory=</span><integer><span>] --vga [[type=]</span><enum><span>] [，clipboard=</span><vnc><span>] [，memory=</span><integer><span>]</span></p><p><span>Configure the VGA hardware. 配置 VGA 硬件。</span></p></li><li><p><span>--virtio[n] [file=]</span><volume><span> [,aio=&lt;native|threads|io_uring&gt;] [,backup=&lt;1|0&gt;] [,bps=</span><bps><span>] [,bps_max_length=</span><seconds><span>] [,bps_rd=</span><bps><span>] [,bps_rd_max_length=</span><seconds><span>] [,bps_wr=</span><bps><span>] [,bps_wr_max_length=</span><seconds><span>] [,cache=</span><enum><span>] [,cyls=</span><integer><span>] [,detect_zeroes=&lt;1|0&gt;] [,discard=&lt;ignore|on&gt;] [,format=</span><enum><span>] [,heads=</span><integer><span>] [,iops=</span><iops><span>] [,iops_max=</span><iops><span>] [,iops_max_length=</span><seconds><span>] [,iops_rd=</span><iops><span>] [,iops_rd_max=</span><iops><span>] [,iops_rd_max_length=</span><seconds><span>] [,iops_wr=</span><iops><span>] [,iops_wr_max=</span><iops><span>] [,iops_wr_max_length=</span><seconds><span>] [,iothread=&lt;1|0&gt;] [,mbps=</span><mbps><span>] [,mbps_max=</span><mbps><span>] [,mbps_rd=</span><mbps><span>] [,mbps_rd_max=</span><mbps><span>] [,mbps_wr=</span><mbps><span>] [,mbps_wr_max=</span><mbps><span>] [,media=&lt;cdrom|disk&gt;] [,replicate=&lt;1|0&gt;] [,rerror=&lt;ignore|report|stop&gt;] [,ro=&lt;1|0&gt;] [,secs=</span><integer><span>] [,serial=</span><serial><span>] [,shared=&lt;1|0&gt;] [,size=</span><DiskSize><span>] [,snapshot=&lt;1|0&gt;] [,trans=&lt;none|lba|auto&gt;] [,werror=</span><enum><span>] --virtio[n] [file=] [，aio=] [，backup=&lt;1 |0&gt;] [，bps=] [，bps_max_length=] [，bps_rd=] [，bps_rd_max_length=] [，bps_wr=] [，bps_wr_max_length=] [，cache=] [，cyls=] [，detect_zeroes=&lt;1 |0&gt;] [，discard=] [，format=] [，heads=] [，iops=] [，iops_max=] [，iops_max_length=] [，iops_rd=] [，iops_rd_max=] [，iops_rd_max_length=] [，iops_wr=] [，iops_wr_max=] [，iops_wr_max_length=] [，iothread=&lt;1 |0&gt;] [，mbps=] [，mbps_max=] [，mbps_rd=] [，mbps_rd_max=] [，mbps_wr=] [，mbps_wr_max=] [，media=] [，replicate&lt;1 |0&gt;=] [，rerror=] [，ro=&lt;1 |0&gt;] [，secs=] [，serial=] [，shared=&lt;1 |0&gt;] [，size=] [，snapshot=&lt;1 |0&gt;] [，trans=] [，werror=]</span></p><p><span>Use volume as VIRTIO hard disk (n is 0 to 15). 使用卷作为 VIRTIO 硬盘（n 为 0 到 15）。</span></p></li><li><p><span>--vmgenid </span><UUID><span> (</span><em><span>default =</span></em><span> 1 (autogenerated)) --vmgenid </span><UUID><span>（</span><em><span>默认值 =</span></em><span> 1（自动生成））</span></p><p><span>Set VM Generation ID. Use </span><em><span>1</span></em><span> to autogenerate on create or update, pass </span><em><span>0</span></em><span> to disable explicitly. 设置 VM 生成 ID。使用 </span><em><span>1</span></em><span> 在创建或更新时自动生成，使用 </span><em><span>0</span></em><span> 显式禁用。</span></p></li><li><p><span>--vmstatestorage </span><storage ID><span> --vmstatestorage &lt;存储 ID&gt;</span></p><p><span>Default storage for VM state volumes/files. VM 状态卷/文件的默认存储。</span></p></li><li><p><span>--watchdog [[model=]&lt;i6300esb|ib700&gt;] [,action=</span><enum><span>] --看门狗 [[model=]&lt;i6300esb|ib700&gt;] [，action=</span><enum><span>]</span></p><p><span>Create a virtual hardware watchdog device. 创建虚拟硬件看门狗设备。</span></p></li></ul><p><strong><span>qm importdisk QM 导入磁盘</span></strong></p><p><span>An alias for </span><em><span>qm disk import</span></em><span>.</span>
<em><span>qm 磁盘导入</span></em><span>的别名。</span></p><p><strong><span>qm importovf</span></strong><span> </span><vmid><span> </span><manifest><span> </span><storage><span> [OPTIONS]</span>
<strong><span>qm importovf</span></strong><span> </span><vmid><span> </span><manifest><span> </span><storage><span> [选项]</span></p><p><span>Create a new VM using parameters read from an OVF manifest</span>
<span>使用从 OVF 清单读取的参数创建新的 VM</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><manifest><span>: </span><string><span> </span><manifest><span>： </span><string></p><p><span>path to the ovf file OVF 文件的路径</span></p></li><li><p><storage><span>: </span><storage ID><span> &lt;存储&gt;： &lt;存储ID&gt;</span></p><p><span>Target storage ID 目标存储 ID</span></p></li><li><p><span>--dryrun </span><boolean></p><p><span>Print a parsed representation of the extracted OVF parameters, but do not create a VM 打印提取的 OVF 参数的解析表示形式，但不创建虚拟机</span></p></li><li><p><span>--format &lt;qcow2 | raw | vmdk&gt;</span></p><p><span>Target format 目标格式</span></p></li></ul><p><strong><span>qm list</span></strong><span> [OPTIONS]</span>
<strong><span>qm 列表</span></strong><span> [选项]</span></p><p><span>Virtual machine index (per node).</span>
<span>虚拟机索引（每个节点）。</span></p><ul><li><p><span>--full </span><boolean></p><p><span>Determine the full status of active VMs. 确定活动 VM 的完整状态。</span></p></li></ul><p><strong><span>qm listsnapshot</span></strong><span> </span><vmid></p><p><span>List all snapshots. 列出所有快照。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li></ul><p><strong><span>qm migrate</span></strong><span> </span><vmid><span> </span><target><span> [OPTIONS]</span>
<strong><span>qm 迁移</span></strong><span> </span><vmid><span> </span><target><span> [选项]</span></p><p><span>Migrate virtual machine. Creates a new migration task.</span>
<span>迁移虚拟机。创建新的迁移任务。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><target><span>: </span><string><span> </span><target><span>： &lt;字符串&gt;</span></p><p><span>Target node. 目标节点。</span></p></li><li><p><span>--bwlimit </span><integer><span> (0 - N) (</span><em><span>default =</span></em><span> migrate limit from datacenter or storage config) --bwlimit </span><integer><span> （0 - N） （</span><em><span>默认值 =</span></em><span> 从数据中心或存储配置迁移限制）</span></p><p><span>Override I/O bandwidth limit (in KiB/s). 覆盖 I/O 带宽限制（以 KiB/s 为单位）。</span></p></li><li><p><span>--force </span><boolean></p><p><span>Allow to migrate VMs which use local devices. Only root may use this option. 允许迁移使用本地设备的 VM。只有 root 可以使用此选项。</span></p></li><li><p><span>--migration_network </span><string></p><p><span>CIDR of the (sub) network that is used for migration. 用于迁移的（子）网络的 CIDR。</span></p></li><li><p><span>--migration_type &lt;insecure | secure&gt;</span></p><p><span>Migration traffic is encrypted using an SSH tunnel by default. On secure, completely private networks this can be disabled to increase performance. 默认情况下，迁移流量使用 SSH 隧道进行加密。在安全、完全专用的网络上，可以禁用此功能以提高性能。</span></p></li><li><p><span>--online </span><boolean></p><p><span>Use online/live migration if VM is running. Ignored if VM is stopped. 如果 VM 正在运行，请使用联机/实时迁移。如果 VM 已停止，则忽略。</span></p></li><li><p><span>--targetstorage </span><string></p><p><span>Mapping from source to target storages. Providing only a single storage ID maps all source storages to that storage. Providing the special value </span><em><span>1</span></em><span> will map each source storage to itself. 从源存储映射到目标存储。仅提供单个存储 ID 会将所有源存储映射到该存储。提供特殊值 </span><em><span>1</span></em><span> 会将每个源存储映射到自身。</span></p></li><li><p><span>--with-local-disks </span><boolean></p><p><span>Enable live storage migration for local disk 为本地磁盘启用实时存储迁移</span></p></li></ul><p><strong><span>qm monitor</span></strong><span> </span><vmid>
<strong><span>qm 监视器</span></strong><span> </span><vmid></p><p><span>Enter QEMU Monitor interface.</span>
<span>进入QEMU Monitor界面。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li></ul><p><strong><span>qm move-disk QM 移动磁盘</span></strong></p><p><span>An alias for </span><em><span>qm disk move</span></em><span>.</span>
<em><span>qm 磁盘移动</span></em><span>的别名。</span></p><p><strong><span>qm move_disk 质量管理move_disk</span></strong></p><p><span>An alias for </span><em><span>qm disk move</span></em><span>.</span>
<em><span>qm 磁盘移动</span></em><span>的别名。</span></p><p><strong><span>qm mtunnel</span></strong></p><p><span>Used by qmigrate - do not use manually.</span>
<span>由 qmigrate 使用 - 请勿手动使用。</span></p><p><strong><span>qm nbdstop</span></strong><span> </span><vmid></p><p><span>Stop embedded nbd server.</span>
<span>停止嵌入式 nbd 服务器。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li></ul><p><strong><span>qm pending</span></strong><span> </span><vmid>
<strong><span>qm 挂起</span></strong><span> </span><vmid></p><p><span>Get the virtual machine configuration with both current and pending values.</span>
<span>获取包含当前值和挂起值的虚拟机配置。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li></ul><p><strong><span>qm reboot</span></strong><span> </span><vmid><span> [OPTIONS]</span>
<strong><span>qm reboot</span></strong><span> </span><vmid><span> [选项]</span></p><p><span>Reboot the VM by shutting it down, and starting it again. Applies pending changes.</span>
<span>通过关闭 VM 并重新启动它来重新启动 VM。应用挂起的更改。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><span>--timeout </span><integer><span> (0 - N) --超时 </span><integer><span> （0 - N）</span></p><p><span>Wait maximal timeout seconds for the shutdown. 等待最大超时秒数以关机。</span></p></li></ul><p><strong><span>qm remote-migrate</span></strong><span> </span><vmid><span> [</span><target-vmid><span>] </span><target-endpoint><span> --target-bridge </span><string><span> --target-storage </span><string><span> [OPTIONS]</span>
<strong><span>qm remote-migrate</span></strong><span> </span><vmid><span> [</span><target-vmid><span>] </span><target-endpoint><span> --target-bridge </span><string><span> --target-storage </span><string><span> [选项]</span></p><p><span>Migrate virtual machine to a remote cluster. Creates a new migration task. EXPERIMENTAL feature!</span>
<span>将虚拟机迁移到远程群集。创建新的迁移任务。实验性功能！</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><target-vmid><span>: </span><integer><span> (100 - 999999999) </span><target-vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><target-endpoint><span>: apitoken=</span><a href='mailto:PVEAPIToken=user@realm!token=SECRET' target='_blank' class='url'>PVEAPIToken=user@realm!token=SECRET</a><span> ,host=</span><ADDRESS><span> [,fingerprint=</span><FINGERPRINT><span>] [,port=</span><PORT><span>] </span><target-endpoint><span>： apitoken=</span><a href='mailto:PVEAPIToken=user@realm！token=SECRET' target='_blank' class='url'>PVEAPIToken=user@realm！token=SECRET</a><span> ，host=</span><ADDRESS><span> [，fingerprint=</span><FINGERPRINT><span>] [，port=</span><PORT><span>]</span></p><p><span>Remote target endpoint 远程目标端点</span></p></li><li><p><span>--bwlimit </span><integer><span> (0 - N) (</span><em><span>default =</span></em><span> migrate limit from datacenter or storage config) --bwlimit </span><integer><span> （0 - N） （</span><em><span>默认值 =</span></em><span> 从数据中心或存储配置迁移限制）</span></p><p><span>Override I/O bandwidth limit (in KiB/s). 覆盖 I/O 带宽限制（以 KiB/s 为单位）。</span></p></li><li><p><span>--delete </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --delete </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Delete the original VM and related data after successful migration. By default the original VM is kept on the source cluster in a stopped state. 迁移成功后，请删除原始虚拟机和相关数据。默认情况下，原始 VM 在源集群上保持停止状态。</span></p></li><li><p><span>--online </span><boolean></p><p><span>Use online/live migration if VM is running. Ignored if VM is stopped. 如果 VM 正在运行，请使用联机/实时迁移。如果 VM 已停止，则忽略。</span></p></li><li><p><span>--target-bridge </span><string></p><p><span>Mapping from source to target bridges. Providing only a single bridge ID maps all source bridges to that bridge. Providing the special value </span><em><span>1</span></em><span> will map each source bridge to itself. 从源网桥到目标网桥的映射。仅提供单个网桥 ID 会将所有源网桥映射到该网桥。提供特殊值 </span><em><span>1</span></em><span> 会将每个源桥映射到自身。</span></p></li><li><p><span>--target-storage </span><string></p><p><span>Mapping from source to target storages. Providing only a single storage ID maps all source storages to that storage. Providing the special value </span><em><span>1</span></em><span> will map each source storage to itself. 从源存储映射到目标存储。仅提供单个存储 ID 会将所有源存储映射到该存储。提供特殊值 </span><em><span>1</span></em><span> 会将每个源存储映射到自身。</span></p></li></ul><p><strong><span>qm rescan QM 重新扫描</span></strong></p><p><span>An alias for </span><em><span>qm disk rescan</span></em><span>.</span>
<em><span>qm 磁盘重新扫描</span></em><span>的别名。</span></p><p><strong><span>qm reset</span></strong><span> </span><vmid><span> [OPTIONS]</span>
<strong><span>qm 重置</span></strong><span> </span><vmid><span> [选项]</span></p><p><span>Reset virtual machine. 重置虚拟机。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><span>--skiplock </span><boolean></p><p><span>Ignore locks - only root is allowed to use this option. 忽略锁 - 只允许 root 使用此选项。</span></p></li></ul><p><strong><span>qm resize QM 调整大小</span></strong></p><p><span>An alias for </span><em><span>qm disk resize</span></em><span>.</span>
<em><span>qm 磁盘调整大小</span></em><span>的别名。</span></p><p><strong><span>qm resume</span></strong><span> </span><vmid><span> [OPTIONS]</span>
<strong><span>qm resume</span></strong><span> </span><vmid><span> [选项]</span></p><p><span>Resume virtual machine. 恢复虚拟机。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><span>--nocheck </span><boolean></p><p><span>no description available 没有可用的描述</span></p></li><li><p><span>--skiplock </span><boolean></p><p><span>Ignore locks - only root is allowed to use this option. 忽略锁 - 只允许 root 使用此选项。</span></p></li></ul><p><strong><span>qm rollback</span></strong><span> </span><vmid><span> </span><snapname><span> [OPTIONS]</span>
<strong><span>qm 回滚</span></strong><span> </span><vmid><span> </span><snapname><span> [选项]</span></p><p><span>Rollback VM state to specified snapshot.</span>
<span>将 VM 状态回滚到指定的快照。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><snapname><span>: </span><string><span> </span><snapname><span>： </span><string></p><p><span>The name of the snapshot. 快照的名称。</span></p></li><li><p><span>--start </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --start </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Whether the VM should get started after rolling back successfully. (Note: VMs will be automatically started if the snapshot includes RAM.) 成功回滚后，VM 是否应启动。（注意：如果快照包含 RAM，则 VM 将自动启动。</span></p></li></ul><p><strong><span>qm sendkey</span></strong><span> </span><vmid><span> </span><key><span> [OPTIONS]</span>
<strong><span>qm sendkey</span></strong><span> </span><vmid><span> </span><key><span> [选项]</span></p><p><span>Send key event to virtual machine.</span>
<span>将密钥事件发送到虚拟机。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><key><span>: </span><string><span> </span><key><span>： </span><string></p><p><span>The key (qemu monitor encoding). 键（qemu 监视器编码）。</span></p></li><li><p><span>--skiplock </span><boolean></p><p><span>Ignore locks - only root is allowed to use this option. 忽略锁 - 只允许 root 使用此选项。</span></p></li></ul><p><strong><span>qm set</span></strong><span> </span><vmid><span> [OPTIONS]</span>
<strong><span>qm set</span></strong><span> </span><vmid><span> [选项]</span></p><p><span>Set virtual machine options (synchrounous API) - You should consider using the POST method instead for any actions involving hotplug or storage allocation.</span>
<span>设置虚拟机选项（同步 API） - 对于涉及热插拔或存储分配的任何操作，应考虑改用 POST 方法。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><span>--acpi </span><boolean><span> (</span><em><span>default =</span></em><span> 1) --acpi </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>Enable/disable ACPI. 启用/禁用 ACPI。</span></p></li><li><p><span>--affinity </span><string><span> --亲和力 </span><string></p><p><span>List of host cores used to execute guest processes, for example: 0,5,8-11 用于执行客户机进程的主机核心列表，例如：0,5,8-11</span></p></li><li><p><span>--agent [enabled=]&lt;1|0&gt; [,freeze-fs-on-backup=&lt;1|0&gt;] [,fstrim_cloned_disks=&lt;1|0&gt;] [,type=&lt;virtio|isa&gt;] --agent [enabled=]&lt;1|0&gt; [，freeze-fs-on-backup=&lt;1|0&gt;] [，fstrim_cloned_disks=&lt;1|0&gt;] [，type=&lt;virtio|isa&gt;]</span></p><p><span>Enable/disable communication with the QEMU Guest Agent and its properties. 启用/禁用与 QEMU Guest Agent 及其属性的通信。</span></p></li><li><p><span>--arch &lt;aarch64 | x86_64&gt;</span></p><p><span>Virtual processor architecture. Defaults to the host. 虚拟处理器体系结构。默认为主机。</span></p></li><li><p><span>--args </span><string></p><p><span>Arbitrary arguments passed to kvm. 传递给 KVM 的任意参数。</span></p></li><li><p><span>--audio0 device=&lt;ich9-intel-hda|intel-hda|AC97&gt; [,driver=&lt;spice|none&gt;] --audio0 device=&lt;ich9-intel-had|intel-had|AC97&gt; [，驱动程序=&lt;spice|none&gt;]</span></p><p><span>Configure a audio device, useful in combination with QXL/Spice. 配置音频设备，与 QXL/Spice 结合使用很有用。</span></p></li><li><p><span>--autostart </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --autostart </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Automatic restart after crash (currently ignored). 崩溃后自动重启（当前忽略）。</span></p></li><li><p><span>--balloon </span><integer><span> (0 - N) --气球 </span><integer><span> （0 - N）</span></p><p><span>Amount of target RAM for the VM in MiB. Using zero disables the ballon driver. VM 的目标 RAM 量（以 MiB 为单位）。使用零将禁用气球驱动器。</span></p></li><li><p><span>--bios &lt;ovmf | seabios&gt; (</span><em><span>default =</span></em><span> seabios) --bios &lt;ovmf | seabios&gt;（</span><em><span>默认值 =</span></em><span> seabios）</span></p><p><span>Select BIOS implementation. 选择 BIOS 实现。</span></p></li><li><p><span>--boot [[legacy=]&lt;[acdn]{1,4}&gt;] [,order=&lt;device[;device...]&gt;] --boot [[legacy=]&lt;[acdn]{1,4}&gt;] [，order=&lt;device[;设备...]&gt;]</span></p><p><span>Specify guest boot order. Use the </span><em><span>order=</span></em><span> sub-property as usage with no key or </span><em><span>legacy=</span></em><span> is deprecated. 指定客户机启动顺序。使用 </span><em><span>order=</span></em><span> 子属性，因为不带键或 </span><em><span>legacy=</span></em><span> 的用法已弃用。</span></p></li><li><p><span>--bootdisk (ide|sata|scsi|virtio)\d+ --bootdisk （IDE|SATA|SCSI|virtio）\d+</span></p><p><span>Enable booting from specified disk. Deprecated: Use </span><em><span>boot: order=foo;bar</span></em><span> instead. 启用从指定磁盘启动。已弃用：使用 </span><em><span>boot： order=foo;条</span></em><span>形图。</span></p></li><li><p><span>--cdrom </span><volume><span> --cdrom &lt;卷&gt;</span></p><p><span>This is an alias for option -ide2 这是选项 -ide2 的别名</span></p></li><li><p><span>--cicustom [meta=</span><volume><span>] [,network=</span><volume><span>] [,user=</span><volume><span>] [,vendor=</span><volume><span>] --cicustom [meta=</span><volume><span>] [，network=</span><volume><span>] [，user=</span><volume><span>] [，vendor=</span><volume><span>]</span></p><p><span>cloud-init: Specify custom files to replace the automatically generated ones at start. cloud-init：指定自定义文件以替换开始时自动生成的文件。</span></p></li><li><p><span>--cipassword </span><password><span> --cipassword &lt;密码&gt;</span></p><p><span>cloud-init: Password to assign the user. Using this is generally not recommended. Use ssh keys instead. Also note that older cloud-init versions do not support hashed passwords. cloud-init：用于分配用户的密码。通常不建议使用此工具。请改用 ssh 密钥。另请注意，较旧的 cloud-init 版本不支持哈希密码。</span></p></li><li><p><span>--citype &lt;configdrive2 | nocloud | opennebula&gt;</span></p><p><span>Specifies the cloud-init configuration format. The default depends on the configured operating system type (ostype. We use the nocloud format for Linux, and configdrive2 for windows. 指定 cloud-init 配置格式。默认值取决于配置的操作系统类型 （ostype.我们对 Linux 使用 nocloud 格式，对 Windows 使用 configdrive2 格式。</span></p></li><li><p><span>--ciupgrade </span><boolean><span> (</span><em><span>default =</span></em><span> 1) --ciupgrade </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>cloud-init: do an automatic package upgrade after the first boot. cloud-init：首次启动后自动升级包。</span></p></li><li><p><span>--ciuser </span><string></p><p><span>cloud-init: User name to change ssh keys and password for instead of the image’s configured default user. cloud-init：用于更改 ssh 密钥和密码的用户名，而不是镜像配置的默认用户。</span></p></li><li><p><span>--cores </span><integer><span> (1 - N) (</span><em><span>default =</span></em><span> 1) --cores </span><integer><span> （1 - N） （</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>The number of cores per socket. 每个插槽的核心数。</span></p></li><li><p><span>--cpu [[cputype=]</span><string><span>] [,flags=&lt;+FLAG[;-FLAG...]&gt;] [,hidden=&lt;1|0&gt;] [,hv-vendor-id=</span><vendor-id><span>] [,phys-bits=&lt;8-64|host&gt;] [,reported-model=</span><enum><span>] --cpu [[cputype=]</span><string><span>] [，flags=&lt;+FLAG[;-FLAG...]&gt;] [，hidden=&lt;1|0&gt;] [，hv-vendor-id=</span><vendor-id><span>] [，phys-bits=&lt;8-64|host&gt;] [，reported-model=</span><enum><span>]</span></p><p><span>Emulated CPU type. 模拟 CPU 类型。</span></p></li><li><p><span>--cpulimit </span><number><span> (0 - 128) (</span><em><span>default =</span></em><span> 0) --cpulimit </span><number><span> （0 - 128） （</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Limit of CPU usage. CPU 使用率限制。</span></p></li><li><p><span>--cpuunits </span><integer><span> (1 - 262144) (</span><em><span>default =</span></em><span> cgroup v1: 1024, cgroup v2: 100) --cpuunits </span><integer><span> （1 - 262144） （</span><em><span>默认值 =</span></em><span> cgroup v1： 1024， cgroup v2： 100）</span></p><p><span>CPU weight for a VM, will be clamped to [1, 10000] in cgroup v2. 在 cgroup v2 中，VM 的 CPU 权重将限制为 [1， 10000]。</span></p></li><li><p><span>--delete </span><string><span> --删除 </span><string></p><p><span>A list of settings you want to delete. 要删除的设置列表。</span></p></li><li><p><span>--description </span><string></p><p><span>Description for the VM. Shown in the web-interface VM’s summary. This is saved as comment inside the configuration file. VM 的说明。显示在 Web 界面 VM 的摘要中。这将在配置文件中另存为注释。</span></p></li><li><p><span>--digest </span><string></p><p><span>Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications. 如果当前配置文件具有不同的 SHA1 摘要，则防止更改。这可用于防止并发修改。</span></p></li><li><p><span>--efidisk0 [file=]</span><volume><span> [,efitype=&lt;2m|4m&gt;] [,format=</span><enum><span>] [,import-from=</span><source volume><span>] [,pre-enrolled-keys=&lt;1|0&gt;] [,size=</span><DiskSize><span>] --efidisk0 [file=]</span><volume><span> [，efitype=&lt;2m|4m&gt;] [，format=</span><enum><span>] [，import-from=</span><source volume><span>] [，pre-enrolled-keys=&lt;1|0&gt;] [，size=</span><DiskSize><span>]</span></p><p><span>Configure a disk for storing EFI vars. Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Note that SIZE_IN_GiB is ignored here and that the default EFI vars are copied to the volume instead. Use STORAGE_ID:0 and the </span><em><span>import-from</span></em><span> parameter to import from an existing volume. 配置用于存储 EFI var 的磁盘。使用特殊语法 STORAGE_ID：SIZE_IN_GiB 分配新卷。请注意，此处将忽略 SIZE_IN_GiB，并且默认的 EFI 变量将复制到卷中。使用 STORAGE_ID：0 和 </span><em><span>import-from</span></em><span> 参数从现有卷导入。</span></p></li><li><p><span>--force </span><boolean></p><p><span>Force physical removal. Without this, we simple remove the disk from the config file and create an additional configuration entry called </span><em><span>unused[n]</span></em><span>, which contains the volume ID. Unlink of unused[n] always cause physical removal. 强制物理移除。如果没有这个，我们只需从配置文件中删除磁盘，并创建一个名为 </span><em><span>unused[n]</span></em><span> 的附加配置条目，其中包含卷 ID。 取消未使用的 [n] 链接总是会导致物理删除。</span><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9YHhAIJFCExAsKUkE8IAFFPIDUIqhBRSDRBUqC%0ACimFFBCBpCWx02IaZ3G2SdyxPZ7vHh6+mcnSZnFjKIge6Wj8zYzvPf9z/me5d8TM+F8WfbkNuFx5%0ABcDLLf/fAEZGRmx4eNh6enqsp6fHhoeHbWRk5D9aFeSlVqHNmzfb6H33sHnT7ZQmD5GfOMax6Sm+%0APl5h1Yc+xpYtW2SBbX1ReUkRGBkZsdH77mHLW95EOv4Ms3ueJh6YYPHUFF9aljJ63z3cf//9/5FI%0AvKQIDA8P293L2yhVjjH7t51ocDiviFecF46n7XzBreChhx4qNhH5t0XjJUVgx44ddGUZ9b/vIpQD%0AoRQIWSDJAiFL6B9axo4dO4gxAmANWVDLG+Ln82URMRGhVCqRHx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zG+VSylz1KCbWyDOh2XyK+56IqjWMKigkUnzWnPPFFFRRLZ29SQRU%0AELOGY4pZ6LKOlM07mZ07d/KOtw1TcB4sGkTDiDQ9K1IkrKeYmQC08d7pZLSiRBpE5s7aS0XAHFEK%0AAGY51Wr18g80Zmb33nsvX/z8XdSmj2AWOXhwkrxe46+79jB55Dh/3T2GxUhHextdXW2sXN7PNWtW%0AIQKDA71FFBoAjIgQkVg/a5+oHrU5zIznDhxk964xKpXKggAoTlWW8+OfPorlOQ//cjsDy1bS2dFO%0AW+diVly1iL6+Pqanpzl5qsL4pPHwN3/G1InDlMsZ7Z1tDA30cfWqIa5dexV9fb2YnT7UTxw4xsHJ%0Ao4yOjfOP8QOMjx/k4OQx7r777lY0zycXvJ02M4sxMjg4SL1eR0TYsGEDw8PD9PX10d7ejogUN3a1%0AGqpKCIE8z5mdnUVVqVarbN++nba2Nvbu3csDDzyAqrJ8+atb+zjn6e/vZ/Xq1axatYq1a9fS29tL%0AlmUMDQ1RKpXOm9EXvV6v1+tWr9eZnp5mZmaGWq1GjLHF62aiNZ+bnPfe45xrvTZzxMyYmZk56+LX%0AzKjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"><span>Requires option(s): delete 需要选项： delete</span></p></li><li><p><span>--freeze </span><boolean><span> --冻结 </span><boolean></p><p><span>Freeze CPU at startup (use </span><em><span>c</span></em><span> monitor command to start execution). 启动时冻结 CPU（使用 </span><em><span>c</span></em><span> monitor 命令开始执行）。</span></p></li><li><p><span>--hookscript </span><string></p><p><span>Script that will be executed during various steps in the vms lifetime. 将在 vms 生命周期的各个步骤中执行的脚本。</span></p></li><li><p><span>--hostpci[n] [[host=]&lt;HOSTPCIID[;HOSTPCIID2...]&gt;] [,device-id=</span><hex id><span>] [,legacy-igd=&lt;1|0&gt;] [,mapping=</span><mapping-id><span>] [,mdev=</span><string><span>] [,pcie=&lt;1|0&gt;] [,rombar=&lt;1|0&gt;] [,romfile=</span><string><span>] [,sub-device-id=</span><hex id><span>] [,sub-vendor-id=</span><hex id><span>] [,vendor-id=</span><hex id><span>] [,x-vga=&lt;1|0&gt;] --hostpci[n] [[host=]&lt;HOSTPCIID[;HOSTPCIID2...]&gt;] [，device-id=</span><hex id><span>] [，legacy-igd=&lt;1|0&gt;] [，mapping=</span><mapping-id><span>] [，mdev=</span><string><span>] [，pcie=&lt;1|0&gt;] [，rombar=&lt;1|0&gt;] [，romfile=</span><string><span>] [，sub-device-id=</span><hex id><span>] [，sub-vendor-id=</span><hex id><span>] [，vendor-id=</span><hex id><span>] [，x-vga=&lt;1|0&gt;]</span></p><p><span>Map host PCI devices into guest. 将主机 PCI 设备映射到客户机。</span></p></li><li><p><span>--hotplug </span><string><span> (</span><em><span>default =</span></em><span> network,disk,usb) --hotplug </span><string><span> （</span><em><span>默认 =</span></em><span> 网络，磁盘，usb）</span></p><p><span>Selectively enable hotplug features. This is a comma separated list of hotplug features: </span><em><span>network</span></em><span>, </span><em><span>disk</span></em><span>, </span><em><span>cpu</span></em><span>, </span><em><span>memory</span></em><span>, </span><em><span>usb</span></em><span> and </span><em><span>cloudinit</span></em><span>. Use </span><em><span>0</span></em><span> to disable hotplug completely. Using </span><em><span>1</span></em><span> as value is an alias for the default network,disk,usb. USB hotplugging is possible for guests with machine version &gt;= 7.1 and ostype l26 or windows &gt; 7. 有选择地启用热插拔功能。这是一个以逗号分隔的热插拔功能列表：</span><em><span>网络</span></em><span>、</span><em><span>磁盘</span></em><span>、</span><em><span>CPU</span></em><span>、</span><em><span>内存</span></em><span>、</span><em><span>USB</span></em><span> 和 </span><em><span>cloudinit</span></em><span>。使用 </span><em><span>0</span></em><span> 完全禁用热插拔。使用 </span><em><span>1</span></em><span> 作为值是默认网络、磁盘、USB 的别名。对于计算机版本 &gt;= 7.1 和 ostype l26 或 Windows &gt; 7 的乘客，可以使用 USB 热插拔。</span></p></li><li><p><span>--hugepages &lt;1024 | 2 | any&gt;</span></p><p><span>Enable/disable hugepages memory. 启用/禁用 hugepages 内存。</span></p></li><li><p><span>--ide[n] [file=]</span><volume><span> [,aio=&lt;native|threads|io_uring&gt;] [,backup=&lt;1|0&gt;] [,bps=</span><bps><span>] [,bps_max_length=</span><seconds><span>] [,bps_rd=</span><bps><span>] [,bps_rd_max_length=</span><seconds><span>] [,bps_wr=</span><bps><span>] [,bps_wr_max_length=</span><seconds><span>] [,cache=</span><enum><span>] [,cyls=</span><integer><span>] [,detect_zeroes=&lt;1|0&gt;] [,discard=&lt;ignore|on&gt;] [,format=</span><enum><span>] [,heads=</span><integer><span>] [,import-from=</span><source volume><span>] [,iops=</span><iops><span>] [,iops_max=</span><iops><span>] [,iops_max_length=</span><seconds><span>] [,iops_rd=</span><iops><span>] [,iops_rd_max=</span><iops><span>] [,iops_rd_max_length=</span><seconds><span>] [,iops_wr=</span><iops><span>] [,iops_wr_max=</span><iops><span>] [,iops_wr_max_length=</span><seconds><span>] [,mbps=</span><mbps><span>] [,mbps_max=</span><mbps><span>] [,mbps_rd=</span><mbps><span>] [,mbps_rd_max=</span><mbps><span>] [,mbps_wr=</span><mbps><span>] [,mbps_wr_max=</span><mbps><span>] [,media=&lt;cdrom|disk&gt;] [,model=</span><model><span>] [,replicate=&lt;1|0&gt;] [,rerror=&lt;ignore|report|stop&gt;] [,secs=</span><integer><span>] [,serial=</span><serial><span>] [,shared=&lt;1|0&gt;] [,size=</span><DiskSize><span>] [,snapshot=&lt;1|0&gt;] [,ssd=&lt;1|0&gt;] [,trans=&lt;none|lba|auto&gt;] [,werror=</span><enum><span>] [,wwn=</span><wwn><span>] --IDE[n] [file=] [，aio=] [，backup=&lt;1 |0&gt;] [，bps=] [，bps_max_length=] [，bps_rd=] [，bps_rd_max_length=] [，bps_wr=] [，bps_wr_max_length=] [，cache=] [，cyls=] [，detect_zeroes=&lt;1 |0&gt;] [，discard=] [，format=] [，heads=] [，import-from=] [，iops=] [，iops_max=] [，iops_max_length=] [，iops_rd=] [，iops_rd_max=] [，iops_rd_max_length=] [，iops_wr=] [，iops_wr_max=] [，iops_wr_max_length=] [，mbps=] [，mbps_max=] [，mbps_rd=] [，mbps_rd_max=] [，mbps_wr=] [，mbps_wr_max=] [，media=] [，model=] [，replicate=&lt;1 |0&gt;] [，rerror=] [，secs=] [，serial=] [，shared=&lt;1 |0&gt;] [，size=] [，snapshot=&lt;1 |0&gt;] [，ssd=&lt;1 |0&gt;] [，trans=] [，werror=] [，wwn=]</span></p><p><span>Use volume as IDE hard disk or CD-ROM (n is 0 to 3). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the </span><em><span>import-from</span></em><span> parameter to import from an existing volume. 使用卷作为 IDE 硬盘或 CD-ROM（n 为 0 到 3）。使用特殊语法 STORAGE_ID：SIZE_IN_GiB 分配新卷。使用 STORAGE_ID：0 和 </span><em><span>import-from</span></em><span> 参数从现有卷导入。</span></p></li><li><p><span>--ipconfig[n] [gw=</span><GatewayIPv4><span>] [,gw6=</span><GatewayIPv6><span>] [,ip=&lt;IPv4Format/CIDR&gt;] [,ip6=&lt;IPv6Format/CIDR&gt;] --ipconfig[n] [gw=</span><GatewayIPv4><span>] [，gw6=</span><GatewayIPv6><span>] [，ip=&lt;IPv4Format/CIDR&gt;] [，ip6=&lt;IPv6Format/CIDR&gt;]</span></p><p><span>cloud-init: Specify IP addresses and gateways for the corresponding interface. cloud-init：指定对应接口的IP地址和网关。IP addresses use CIDR notation, gateways are optional but need an IP of the same type specified. IP 地址使用 CIDR 表示法，网关是可选的，但需要指定的相同类型的 IP。The special string </span><em><span>dhcp</span></em><span> can be used for IP addresses to use DHCP, in which case no explicit gateway should be provided. For IPv6 the special string </span><em><span>auto</span></em><span> can be used to use stateless autoconfiguration. This requires cloud-init 19.4 or newer. 特殊字符串 </span><em><span>dhcp</span></em><span> 可用于 IP 地址以使用 DHCP，在这种情况下，不应提供显式网关。对于 IPv6，可以使用特殊字符串 </span><em><span>auto</span></em><span> 来使用无状态自动配置。这需要 cloud-init 19.4 或更高版本。If cloud-init is enabled and neither an IPv4 nor an IPv6 address is specified, it defaults to using dhcp on IPv4. 如果启用了 cloud-init，且未指定 IPv4 和 IPv6 地址，则默认在 IPv4 上使用 dhcp。</span></p></li><li><p><span>--ivshmem size=</span><integer><span> [,name=</span><string><span>] --ivshmem size=</span><integer><span> [，name=</span><string><span>]</span></p><p><span>Inter-VM shared memory. Useful for direct communication between VMs, or to the host. 虚拟机间共享内存。对于虚拟机之间的直接通信或与主机的直接通信非常有用。</span></p></li><li><p><span>--keephugepages </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --keephugepages </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Use together with hugepages. If enabled, hugepages will not not be deleted after VM shutdown and can be used for subsequent starts. 与 hugepages 一起使用。如果启用，则 Hugepages 在 VM 关闭后不会被删除，并且可用于后续启动。</span></p></li><li><p><span>--keyboard &lt;da | de | de-ch | en-gb | en-us | es | fi | fr | fr-be | fr-ca | fr-ch | hu | is | it | ja | lt | mk | nl | no | pl | pt | pt-br | sl | sv | tr&gt; --keyboard &lt;da | de | de-ch | en-gb | en-us | es | fi | fr | fr-be | fr-ca | fr-ch | 胡 | 是 | it | ja | lt | mk | nl | no | pl | pt | pt-br | sl | sv | tr&gt;</span></p><p><span>Keyboard layout for VNC server. This option is generally not required and is often better handled from within the guest OS. VNC 服务器的键盘布局。此选项通常不是必需的，通常最好在客户机操作系统中处理。</span></p></li><li><p><span>--kvm </span><boolean><span> (</span><em><span>default =</span></em><span> 1) --kvm </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>Enable/disable KVM hardware virtualization. 启用/禁用 KVM 硬件虚拟化。</span></p></li><li><p><span>--localtime </span><boolean></p><p><span>Set the real time clock (RTC) to local time. This is enabled by default if the ostype indicates a Microsoft Windows OS. 将实时时钟 （RTC） 设置为本地时间。如果 ostype 指示 Microsoft Windows 操作系统，则默认情况下启用此功能。</span></p></li><li><p><span>--lock &lt;backup | clone | create | migrate | rollback | snapshot | snapshot-delete | suspended | suspending&gt; --lock &lt;备份 | 克隆 | 创建 | 迁移 | 回滚 | 快照 | 快照删除 | 已暂停 | 挂起&gt;</span></p><p><span>Lock/unlock the VM. 锁定/解锁 VM。</span></p></li><li><p><span>--machine [[type=]</span><machine type><span>] [,viommu=&lt;intel|virtio&gt;] --machine [[type=]</span><machine type><span>] [，viommu=&lt;intel|virtio&gt;]</span></p><p><span>Specify the QEMU machine. 指定 QEMU 机器。</span></p></li><li><p><span>--memory [current=]</span><integer><span> --内存 [current=]</span><integer></p><p><span>Memory properties. 内存属性。</span></p></li><li><p><span>--migrate_downtime </span><number><span> (0 - N) (</span><em><span>default =</span></em><span> 0.1) --migrate_downtime </span><number><span> （0 - N） （</span><em><span>默认值 =</span></em><span> 0.1）</span></p><p><span>Set maximum tolerated downtime (in seconds) for migrations. Should the migration not be able to converge in the very end, because too much newly dirtied RAM needs to be transferred, the limit will be increased automatically step-by-step until migration can converge. 为迁移设置允许的最大停机时间（以秒为单位）。如果迁移最终无法收敛，因为需要传输太多新污染的 RAM，则限制将自动逐步增加，直到迁移可以收敛。</span></p></li><li><p><span>--migrate_speed </span><integer><span> (0 - N) (</span><em><span>default =</span></em><span> 0) --migrate_speed </span><integer><span>（0 - N） （</span><em><span>默认值</span></em><span>=0）</span></p><p><span>Set maximum speed (in MB/s) for migrations. Value 0 is no limit. 设置迁移的最大速度（以 MB/s 为单位）。值 0 没有限制。</span></p></li><li><p><span>--name </span><string></p><p><span>Set a name for the VM. Only used on the configuration web interface. 为 VM 设置名称。仅在配置 Web 界面上使用。</span></p></li><li><p><span>--nameserver </span><string></p><p><span>cloud-init: Sets DNS server IP address for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set. cloud-init：设置容器的DNS服务器IP地址。如果 searchdomain 和 nameserver 均未设置，Create 将自动使用主机的设置。</span></p></li><li><p><span>--net[n] [model=]</span><enum><span> [,bridge=</span><bridge><span>] [,firewall=&lt;1|0&gt;] [,link_down=&lt;1|0&gt;] [,macaddr=</span><a href='XX:XX:XX:XX:XX:XX' target='_blank' class='url'>XX:XX:XX:XX:XX:XX</a><span>] [,mtu=</span><integer><span>] [,queues=</span><integer><span>] [,rate=</span><number><span>] [,tag=</span><integer><span>] [,trunks=&lt;vlanid[;vlanid...]&gt;] [,</span><model><span>=</span><macaddr><span>] --net[n] [model=]</span><enum><span> [，bridge=</span><bridge><span>] [，firewall=&lt;1|0&gt;] [，link_down=&lt;1|0&gt;] [，macaddr=&lt;XX：XX：XX：XX：XX：XX&gt;] [，mtu=</span><integer><span>] [，queues=</span><integer><span>] [，rate=</span><number><span>] [，tag=</span><integer><span>] [，trunks=&lt;vlanid[;弗拉尼德...]&gt;] [，</span><model><span>=</span><macaddr><span>]</span></p><p><span>Specify network devices. 指定网络设备。</span></p></li><li><p><span>--numa </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --numa </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Enable/disable NUMA. 启用/禁用 NUMA。</span></p></li><li><p><span>--numa[n] cpus=&lt;id[-id];...&gt; [,hostnodes=&lt;id[-id];...&gt;] [,memory=</span><number><span>] [,policy=&lt;preferred|bind|interleave&gt;] --numa[n] cpus=&lt;id[-id];...&gt; [，hostnodes=&lt;id[-id];...&gt;] [，memory=</span><number><span>] [，policy=&lt;preferred|bind|interleave&gt;]</span></p><p><span>NUMA topology. NUMA 拓扑。</span></p></li><li><p><span>--onboot </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --onboot </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Specifies whether a VM will be started during system bootup. 指定在系统启动期间是否启动 VM。</span></p></li><li><p><span>--ostype &lt;l24 | l26 | other | solaris | w2k | w2k3 | w2k8 | win10 | win11 | win7 | win8 | wvista | wxp&gt; --ostype &lt;l24 | l26 | 其他 | Solaris | W2K | W2K3 | W2K8 | Win10 | Win11 | Win7 | Win8 | wvista | wxp&gt;</span></p><p><span>Specify guest operating system. 指定客户机操作系统。</span></p></li><li><p><span>--parallel[n] /dev/parport\d+|/dev/usb/lp\d+</span></p><p><span>Map host parallel devices (n is 0 to 2). 映射主机并行设备（n 为 0 到 2）。</span></p></li><li><p><span>--protection </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --protection </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Sets the protection flag of the VM. This will disable the remove VM and remove disk operations. 设置 VM 的保护标志。这将禁用删除 VM 和删除磁盘操作。</span></p></li><li><p><span>--reboot </span><boolean><span> (</span><em><span>default =</span></em><span> 1) --reboot </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>Allow reboot. If set to </span><em><span>0</span></em><span> the VM exit on reboot. 允许重新启动。如果设置为 </span><em><span>0</span></em><span>，则 VM 将在重新启动时退出。</span></p></li><li><p><span>--revert </span><string></p><p><span>Revert a pending change. 还原挂起的更改。</span></p></li><li><p><span>--rng0 [source=]&lt;/dev/urandom|/dev/random|/dev/hwrng&gt; [,max_bytes=</span><integer><span>] [,period=</span><integer><span>] --rng0 [source=]&lt;/dev/urandom|/dev/random|/dev/hwrng&gt; [，max_bytes=</span><integer><span>] [，period=</span><integer><span>]</span></p><p><span>Configure a VirtIO-based Random Number Generator. 配置基于 VirtIO 的随机数生成器。</span></p></li><li><p><span>--sata[n] [file=]</span><volume><span> [,aio=&lt;native|threads|io_uring&gt;] [,backup=&lt;1|0&gt;] [,bps=</span><bps><span>] [,bps_max_length=</span><seconds><span>] [,bps_rd=</span><bps><span>] [,bps_rd_max_length=</span><seconds><span>] [,bps_wr=</span><bps><span>] [,bps_wr_max_length=</span><seconds><span>] [,cache=</span><enum><span>] [,cyls=</span><integer><span>] [,detect_zeroes=&lt;1|0&gt;] [,discard=&lt;ignore|on&gt;] [,format=</span><enum><span>] [,heads=</span><integer><span>] [,import-from=</span><source volume><span>] [,iops=</span><iops><span>] [,iops_max=</span><iops><span>] [,iops_max_length=</span><seconds><span>] [,iops_rd=</span><iops><span>] [,iops_rd_max=</span><iops><span>] [,iops_rd_max_length=</span><seconds><span>] [,iops_wr=</span><iops><span>] [,iops_wr_max=</span><iops><span>] [,iops_wr_max_length=</span><seconds><span>] [,mbps=</span><mbps><span>] [,mbps_max=</span><mbps><span>] [,mbps_rd=</span><mbps><span>] [,mbps_rd_max=</span><mbps><span>] [,mbps_wr=</span><mbps><span>] [,mbps_wr_max=</span><mbps><span>] [,media=&lt;cdrom|disk&gt;] [,replicate=&lt;1|0&gt;] [,rerror=&lt;ignore|report|stop&gt;] [,secs=</span><integer><span>] [,serial=</span><serial><span>] [,shared=&lt;1|0&gt;] [,size=</span><DiskSize><span>] [,snapshot=&lt;1|0&gt;] [,ssd=&lt;1|0&gt;] [,trans=&lt;none|lba|auto&gt;] [,werror=</span><enum><span>] [,wwn=</span><wwn><span>] --sata[n] [file=] [，aio=] [，backup=&lt;1 |0&gt;] [，bps=] [，bps_max_length=] [，bps_rd=] [，bps_rd_max_length=] [，bps_wr=] [，bps_wr_max_length=] [，cache=] [，cyls=] [，detect_zeroes=&lt;1 |0&gt;] [，discard=] [，format=] [，heads=] [，import-from=] [，iops=] [，iops_max=] [，iops_max_length=] [，iops_rd=] [，iops_rd_max=] [，iops_rd_max_length=] [，iops_wr=] [，iops_wr_max=] [，iops_wr_max_length=] [，mbps=] [，mbps_max=] [，mbps_rd=] [，mbps_rd_max=] [，mbps_wr=] [，mbps_wr_max=] [，media=] [，replicate=&lt;1 |0&gt;] [，rerror=] [，secs=] [，serial=] [，shared=&lt;1 |0&gt;] [，size=] [，snapshot&lt;1 |0&gt;=] [，ssd&lt;1 |0&gt;=] [，trans=] [，werror=] [，wwn=]</span></p><p><span>Use volume as SATA hard disk or CD-ROM (n is 0 to 5). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the </span><em><span>import-from</span></em><span> parameter to import from an existing volume. 使用卷作为 SATA 硬盘或 CD-ROM（n 为 0 到 5）。使用特殊语法 STORAGE_ID：SIZE_IN_GiB 分配新卷。使用 STORAGE_ID：0 和 </span><em><span>import-from</span></em><span> 参数从现有卷导入。</span></p></li><li><p><span>--scsi[n] [file=]</span><volume><span> [,aio=&lt;native|threads|io_uring&gt;] [,backup=&lt;1|0&gt;] [,bps=</span><bps><span>] [,bps_max_length=</span><seconds><span>] [,bps_rd=</span><bps><span>] [,bps_rd_max_length=</span><seconds><span>] [,bps_wr=</span><bps><span>] [,bps_wr_max_length=</span><seconds><span>] [,cache=</span><enum><span>] [,cyls=</span><integer><span>] [,detect_zeroes=&lt;1|0&gt;] [,discard=&lt;ignore|on&gt;] [,format=</span><enum><span>] [,heads=</span><integer><span>] [,import-from=</span><source volume><span>] [,iops=</span><iops><span>] [,iops_max=</span><iops><span>] [,iops_max_length=</span><seconds><span>] [,iops_rd=</span><iops><span>] [,iops_rd_max=</span><iops><span>] [,iops_rd_max_length=</span><seconds><span>] [,iops_wr=</span><iops><span>] [,iops_wr_max=</span><iops><span>] [,iops_wr_max_length=</span><seconds><span>] [,iothread=&lt;1|0&gt;] [,mbps=</span><mbps><span>] [,mbps_max=</span><mbps><span>] [,mbps_rd=</span><mbps><span>] [,mbps_rd_max=</span><mbps><span>] [,mbps_wr=</span><mbps><span>] [,mbps_wr_max=</span><mbps><span>] [,media=&lt;cdrom|disk&gt;] [,product=</span><product><span>] [,queues=</span><integer><span>] [,replicate=&lt;1|0&gt;] [,rerror=&lt;ignore|report|stop&gt;] [,ro=&lt;1|0&gt;] [,scsiblock=&lt;1|0&gt;] [,secs=</span><integer><span>] [,serial=</span><serial><span>] [,shared=&lt;1|0&gt;] [,size=</span><DiskSize><span>] [,snapshot=&lt;1|0&gt;] [,ssd=&lt;1|0&gt;] [,trans=&lt;none|lba|auto&gt;] [,vendor=</span><vendor><span>] [,werror=</span><enum><span>] [,wwn=</span><wwn><span>] --scsi[n] [file=] [，aio=] [，backup=&lt;1 |0&gt;] [，bps=] [，bps_max_length=] [，bps_rd=] [，bps_rd_max_length=] [，bps_wr=] [，bps_wr_max_length=] [，cache=] [，cyls=] [，detect_zeroes=&lt;1 |0&gt;] [，discard=] [，format=] [，heads=] [，import-from=] [，iops=] [，iops_max=] [，iops_max_length=] [，iops_rd=] [，iops_rd_max=] [，iops_rd_max_length=] [，iops_wr=] [，iops_wr_max=] [，iops_wr_max_length=] [，iothread=&lt;1 |0&gt;] [，mbps=] [，mbps_max=] [，mbps_rd=] [，mbps_rd_max=] [，mbps_wr=] [，mbps_wr_max=] [，media=] [，product=] [，queues=] [，replicate=&lt;1 |0&gt;] [，rerror=] [，ro=&lt;1 |0&gt;] [，scsiblock=&lt;1 |0&gt;] [，secs=] [，serial=] [&lt;1 |0&gt;，shared=] [，size=] [，snapshot=&lt;1 |0&gt;] [，ssd=&lt;1 |0&gt;] [，trans=] [，供应商=] [，werror=] [，wwn=]</span></p><p><span>Use volume as SCSI hard disk or CD-ROM (n is 0 to 30). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the </span><em><span>import-from</span></em><span> parameter to import from an existing volume. 使用卷作为 SCSI 硬盘或 CD-ROM（n 为 0 到 30）。使用特殊语法 STORAGE_ID：SIZE_IN_GiB 分配新卷。使用 STORAGE_ID：0 和 </span><em><span>import-from</span></em><span> 参数从现有卷导入。</span></p></li><li><p><span>--scsihw &lt;lsi | lsi53c810 | megasas | pvscsi | virtio-scsi-pci | virtio-scsi-single&gt; (</span><em><span>default =</span></em><span> lsi) --scsihw &lt;lsi | lsi53c810 | megasas | pvscsi | virtio-scsi-pci | virtio-scsi-single&gt;（</span><em><span>默认值 =</span></em><span> lsi）</span></p><p><span>SCSI controller model SCSI 控制器型号</span></p></li><li><p><span>--searchdomain </span><string></p><p><span>cloud-init: Sets DNS search domains for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set. cloud-init：设置容器的DNS搜索域。如果 searchdomain 和 nameserver 均未设置，Create 将自动使用主机的设置。</span></p></li><li><p><span>--serial[n] (/dev/.+|socket) --serial[n] （/dev/.+|套接字）</span></p><p><span>Create a serial device inside the VM (n is 0 to 3) 在 VM 内部创建串行设备（n 为 0 到 3）</span></p></li><li><p><span>--shares </span><integer><span> (0 - 50000) (</span><em><span>default =</span></em><span> 1000) --shares </span><integer><span> （0 - 50000） （</span><em><span>默认值 =</span></em><span> 1000）</span></p><p><span>Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. Number is relative to weights of all other running VMs. Using zero disables auto-ballooning. Auto-ballooning is done by pvestatd. 用于自动膨胀的内存份额量。数字越大，此 VM 获得的内存就越多。该数字与所有其他正在运行的 VM 的权重相关。使用零将禁用自动膨胀。自动气球是由 pvestatd 完成的。</span></p></li><li><p><span>--skiplock </span><boolean></p><p><span>Ignore locks - only root is allowed to use this option. 忽略锁 - 只允许 root 使用此选项。</span></p></li><li><p><span>--smbios1 [base64=&lt;1|0&gt;] [,family=</span><Base64 encoded string><span>] [,manufacturer=</span><Base64 encoded string><span>] [,product=</span><Base64 encoded string><span>] [,serial=</span><Base64 encoded string><span>] [,sku=</span><Base64 encoded string><span>] [,uuid=</span><UUID><span>] [,version=</span><Base64 encoded string><span>] --smbios1 [base64=&lt;1|0&gt;] [，family=&lt;Base64 编码字符串&gt;] [，manufacturer=&lt;Base64 编码字符串&gt;] [，product=&lt;Base64 编码字符串&gt;] [，serial=&lt;Base64 编码字符串&gt;] [，sku=&lt;Base64 编码字符串&gt;] [，uuid=</span><UUID><span>] [，version=&lt;Base64 编码字符串&gt;]</span></p><p><span>Specify SMBIOS type 1 fields. 指定 SMBIOS 类型 1 字段。</span></p></li><li><p><span>--smp </span><integer><span> (1 - N) (</span><em><span>default =</span></em><span> 1) --smp </span><integer><span> （1 - N） （</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>The number of CPUs. Please use option -sockets instead. CPU 的数量。请改用选项 -sockets。</span></p></li><li><p><span>--sockets </span><integer><span> (1 - N) (</span><em><span>default =</span></em><span> 1) --sockets </span><integer><span> （1 - N） （</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>The number of CPU sockets. CPU 插槽的数量。</span></p></li><li><p><span>--spice_enhancements [foldersharing=&lt;1|0&gt;] [,videostreaming=&lt;off|all|filter&gt;] --spice_enhancements [foldersharing=&lt;1|0&gt;] [，videostreaming=&lt;off|all|filter&gt;]</span></p><p><span>Configure additional enhancements for SPICE. 配置 SPICE 的其他增强功能。</span></p></li><li><p><span>--sshkeys </span><filepath><span> --sshkeys &lt;文件路径&gt;</span></p><p><span>cloud-init: Setup public SSH keys (one key per line, OpenSSH format). cloud-init：设置公有 SSH 密钥（每行一个密钥，OpenSSH 格式）。</span></p></li><li><p><span>--startdate (now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS) (</span><em><span>default =</span></em><span> now) --startdate （现在 |YYYY-MM-DD |YYYY-MM-DDTHH：MM：SS） </span><em><span>（默认值 =</span></em><span> 现在）</span></p><p><span>Set the initial date of the real time clock. Valid format for date are:&#39;now&#39; or </span><em><span>2006-06-17T16:01:21</span></em><span> or </span><em><span>2006-06-17</span></em><span>. 设置实时时钟的初始日期。日期的有效格式为：“现在”或 </span><em><span>2006-06-17T16：01：21</span></em><span> 或 </span><em><span>2006-06-17</span></em><span>。</span></p></li><li><p><span>--startup </span><code>[[order=]\d+] [,up=\d+] [,down=\d+]</code><span> --startup &#39;[[订单=]\d+] [，up=\d+] [，down=\d+] &#39;</span></p><p><span>Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the </span><em><span>up</span></em><span> or </span><em><span>down</span></em><span> delay in seconds, which specifies a delay to wait before the next VM is started or stopped. 启动和关闭行为。Order 是一个非负数，用于定义一般启动顺序。通过反向排序完成关机。此外，还可以设置</span><em><span>启动</span></em><span>或</span><em><span>关闭</span></em><span>延迟（以秒为单位），这指定了在启动或停止下一个 VM 之前要等待的延迟。</span></p></li><li><p><span>--tablet </span><boolean><span> (</span><em><span>default =</span></em><span> 1) --tablet </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>Enable/disable the USB tablet device. 启用/禁用 USB 平板电脑设备。</span></p></li><li><p><span>--tags </span><string><span> --标签 </span><string></p><p><span>Tags of the VM. This is only meta information. VM 的标记。这只是元信息。</span></p></li><li><p><span>--tdf </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --tdf </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Enable/disable time drift fix. 启用/禁用时间漂移修复。</span></p></li><li><p><span>--template </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --template </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Enable/disable Template. 启用/禁用模板。</span></p></li><li><p><span>--tpmstate0 [file=]</span><volume><span> [,import-from=</span><source volume><span>] [,size=</span><DiskSize><span>] [,version=&lt;v1.2|v2.0&gt;] --tpmstate0 [file=]</span><volume><span> [，import-from=</span><source volume><span>] [，size=</span><DiskSize><span>] [，version=&lt;v1.2|v2.0&gt;]</span></p><p><span>Configure a Disk for storing TPM state. The format is fixed to </span><em><span>raw</span></em><span>. Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Note that SIZE_IN_GiB is ignored here and 4 MiB will be used instead. Use STORAGE_ID:0 and the </span><em><span>import-from</span></em><span> parameter to import from an existing volume. 配置用于存储 TPM 状态的磁盘。格式固定为</span><em><span>原始</span></em><span>格式。使用特殊语法 STORAGE_ID：SIZE_IN_GiB 分配新卷。请注意，此处忽略 SIZE_IN_GiB，而是使用 4 MiB。使用 STORAGE_ID：0 和 </span><em><span>import-from</span></em><span> 参数从现有卷导入。</span></p></li><li><p><span>--unused[n] [file=]</span><volume></p><p><span>Reference to unused volumes. This is used internally, and should not be modified manually. 对未使用卷的引用。这是在内部使用的，不应手动修改。</span></p></li><li><p><span>--usb[n] [[host=]&lt;HOSTUSBDEVICE|spice&gt;] [,mapping=</span><mapping-id><span>] [,usb3=&lt;1|0&gt;] --usb[n] [[host=]&lt;HOSTUSBDEVICE|spice&gt;] [，mapping=</span><mapping-id><span>] [，usb3=&lt;1|0&gt;]</span></p><p><span>Configure an USB device (n is 0 to 4, for machine version &gt;= 7.1 and ostype l26 or windows &gt; 7, n can be up to 14). 配置 USB 设备（n 为 0 到 4，对于计算机版本 &gt;= 7.1 和 ostype l26 或 Windows &gt; 7，n 最多为 14）。</span></p></li><li><p><span>--vcpus </span><integer><span> (1 - N) (</span><em><span>default =</span></em><span> 0) --vcpus </span><integer><span> （1 - N） （</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Number of hotplugged vcpus. 热插拔的 vCPU 数量。</span></p></li><li><p><span>--vga [[type=]</span><enum><span>] [,clipboard=</span><vnc><span>] [,memory=</span><integer><span>] --vga [[type=]</span><enum><span>] [，clipboard=</span><vnc><span>] [，memory=</span><integer><span>]</span></p><p><span>Configure the VGA hardware. 配置 VGA 硬件。</span></p></li><li><p><span>--virtio[n] [file=]</span><volume><span> [,aio=&lt;native|threads|io_uring&gt;] [,backup=&lt;1|0&gt;] [,bps=</span><bps><span>] [,bps_max_length=</span><seconds><span>] [,bps_rd=</span><bps><span>] [,bps_rd_max_length=</span><seconds><span>] [,bps_wr=</span><bps><span>] [,bps_wr_max_length=</span><seconds><span>] [,cache=</span><enum><span>] [,cyls=</span><integer><span>] [,detect_zeroes=&lt;1|0&gt;] [,discard=&lt;ignore|on&gt;] [,format=</span><enum><span>] [,heads=</span><integer><span>] [,import-from=</span><source volume><span>] [,iops=</span><iops><span>] [,iops_max=</span><iops><span>] [,iops_max_length=</span><seconds><span>] [,iops_rd=</span><iops><span>] [,iops_rd_max=</span><iops><span>] [,iops_rd_max_length=</span><seconds><span>] [,iops_wr=</span><iops><span>] [,iops_wr_max=</span><iops><span>] [,iops_wr_max_length=</span><seconds><span>] [,iothread=&lt;1|0&gt;] [,mbps=</span><mbps><span>] [,mbps_max=</span><mbps><span>] [,mbps_rd=</span><mbps><span>] [,mbps_rd_max=</span><mbps><span>] [,mbps_wr=</span><mbps><span>] [,mbps_wr_max=</span><mbps><span>] [,media=&lt;cdrom|disk&gt;] [,replicate=&lt;1|0&gt;] [,rerror=&lt;ignore|report|stop&gt;] [,ro=&lt;1|0&gt;] [,secs=</span><integer><span>] [,serial=</span><serial><span>] [,shared=&lt;1|0&gt;] [,size=</span><DiskSize><span>] [,snapshot=&lt;1|0&gt;] [,trans=&lt;none|lba|auto&gt;] [,werror=</span><enum><span>] --virtio[n] [file=] [，aio=] [，backup=&lt;1 |0&gt;] [，bps=] [，bps_max_length=] [，bps_rd=] [，bps_rd_max_length=] [，bps_wr=] [，bps_wr_max_length=] [，cache=] [，cyls=] [，detect_zeroes=&lt;1 |0&gt;] [，discard=] [，format=] [，heads=] [，import-from=] [，iops=] [，iops_max=] [，iops_max_length=] [，iops_rd=] [，iops_rd_max=] [，iops_rd_max_length=] [，iops_wr=] [，iops_wr_max=] [，iops_wr_max_length=] [，iothread=&lt;1 |0&gt;] [，mbps=] [，mbps_max=] [，mbps_rd=] [，mbps_rd_max=] [，mbps_wr=] [，mbps_wr_max=] [，media=] [，replicate=&lt;1 |0&gt;] [，rerror=] [，ro=&lt;1 |0&gt;] [，secs=] [，serial=] [，shared=&lt;1 |0&gt;] [，size=] [，snapshot=&lt;1 |0&gt;] [，trans=] [，werror=]</span></p><p><span>Use volume as VIRTIO hard disk (n is 0 to 15). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the </span><em><span>import-from</span></em><span> parameter to import from an existing volume. 使用卷作为 VIRTIO 硬盘（n 为 0 到 15）。使用特殊语法 STORAGE_ID：SIZE_IN_GiB 分配新卷。使用 STORAGE_ID：0 和 </span><em><span>import-from</span></em><span> 参数从现有卷导入。</span></p></li><li><p><span>--vmgenid </span><UUID><span> (</span><em><span>default =</span></em><span> 1 (autogenerated)) --vmgenid </span><UUID><span>（</span><em><span>默认值 =</span></em><span> 1（自动生成））</span></p><p><span>Set VM Generation ID. Use </span><em><span>1</span></em><span> to autogenerate on create or update, pass </span><em><span>0</span></em><span> to disable explicitly. 设置 VM 生成 ID。使用 </span><em><span>1</span></em><span> 在创建或更新时自动生成，使用 </span><em><span>0</span></em><span> 显式禁用。</span></p></li><li><p><span>--vmstatestorage </span><storage ID><span> --vmstatestorage &lt;存储 ID&gt;</span></p><p><span>Default storage for VM state volumes/files. VM 状态卷/文件的默认存储。</span></p></li><li><p><span>--watchdog [[model=]&lt;i6300esb|ib700&gt;] [,action=</span><enum><span>] --看门狗 [[model=]&lt;i6300esb|ib700&gt;] [，action=</span><enum><span>]</span></p><p><span>Create a virtual hardware watchdog device. 创建虚拟硬件看门狗设备。</span></p></li></ul><p><strong><span>qm showcmd</span></strong><span> </span><vmid><span> [OPTIONS]</span>
<strong><span>qm showcmd</span></strong><span> </span><vmid><span> [选项]</span></p><p><span>Show command line which is used to start the VM (debug info).</span>
<span>显示用于启动 VM 的命令行（调试信息）。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><span>--pretty </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --pretty </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Puts each option on a new line to enhance human readability 将每个选项放在一个新行上，以增强人类的可读性</span></p></li><li><p><span>--snapshot </span><string></p><p><span>Fetch config values from given snapshot. 从给定的快照中获取配置值。</span></p></li></ul><p><strong><span>qm shutdown</span></strong><span> </span><vmid><span> [OPTIONS]</span>
<strong><span>qm shutdown</span></strong><span> </span><vmid><span> [选项]</span></p><p><span>Shutdown virtual machine. This is similar to pressing the power button on a physical machine. This will send an ACPI event for the guest OS, which should then proceed to a clean shutdown.</span>
<span>关闭虚拟机。这类似于在物理计算机上按下电源按钮。这将为来宾 OS 发送 ACPI 事件，然后应继续进行干净关闭。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><span>--forceStop </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --forceStop </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Make sure the VM stops. 确保 VM 停止。</span></p></li><li><p><span>--keepActive </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --keepActive </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Do not deactivate storage volumes. 请勿停用存储卷。</span></p></li><li><p><span>--skiplock </span><boolean></p><p><span>Ignore locks - only root is allowed to use this option. 忽略锁 - 只允许 root 使用此选项。</span></p></li><li><p><span>--timeout </span><integer><span> (0 - N) --超时 </span><integer><span> （0 - N）</span></p><p><span>Wait maximal timeout seconds. 等待最大超时秒数。</span></p></li></ul><p><strong><span>qm snapshot</span></strong><span> </span><vmid><span> </span><snapname><span> [OPTIONS]</span>
<strong><span>qm 快照</span></strong><span> </span><vmid><span> </span><snapname><span> [选项]</span></p><p><span>Snapshot a VM. 对 VM 进行快照。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><snapname><span>: </span><string><span> </span><snapname><span>： </span><string></p><p><span>The name of the snapshot. 快照的名称。</span></p></li><li><p><span>--description </span><string></p><p><span>A textual description or comment. 文本描述或注释。</span></p></li><li><p><span>--vmstate </span><boolean></p><p><span>Save the vmstate 保存 vmstate</span></p></li></ul><p><strong><span>qm start</span></strong><span> </span><vmid><span> [OPTIONS]</span>
<strong><span>qm start</span></strong><span> </span><vmid><span> [选项]</span></p><p><span>Start virtual machine. 启动虚拟机。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><span>--force-cpu </span><string></p><p><span>Override QEMU’s -cpu argument with the given string. 用给定的字符串覆盖 QEMU 的 -cpu 参数。</span></p></li><li><p><span>--machine [[type=]</span><machine type><span>] [,viommu=&lt;intel|virtio&gt;] --machine [[type=]</span><machine type><span>] [，viommu=&lt;intel|virtio&gt;]</span></p><p><span>Specify the QEMU machine. 指定 QEMU 机器。</span></p></li><li><p><span>--migratedfrom </span><string></p><p><span>The cluster node name. 群集节点名称。</span></p></li><li><p><span>--migration_network </span><string></p><p><span>CIDR of the (sub) network that is used for migration. 用于迁移的（子）网络的 CIDR。</span></p></li><li><p><span>--migration_type &lt;insecure | secure&gt;</span></p><p><span>Migration traffic is encrypted using an SSH tunnel by default. On secure, completely private networks this can be disabled to increase performance. 默认情况下，迁移流量使用 SSH 隧道进行加密。在安全、完全专用的网络上，可以禁用此功能以提高性能。</span></p></li><li><p><span>--skiplock </span><boolean></p><p><span>Ignore locks - only root is allowed to use this option. 忽略锁 - 只允许 root 使用此选项。</span></p></li><li><p><span>--stateuri </span><string></p><p><span>Some command save/restore state from this location. 某些命令从此位置保存/恢复状态。</span></p></li><li><p><span>--targetstorage </span><string></p><p><span>Mapping from source to target storages. Providing only a single storage ID maps all source storages to that storage. Providing the special value </span><em><span>1</span></em><span> will map each source storage to itself. 从源存储映射到目标存储。仅提供单个存储 ID 会将所有源存储映射到该存储。提供特殊值 </span><em><span>1</span></em><span> 会将每个源存储映射到自身。</span></p></li><li><p><span>--timeout </span><integer><span> (0 - N) (</span><em><span>default =</span></em><span> max(30, vm memory in GiB)) --timeout </span><integer><span> （0 - N） （</span><em><span>默认值 =</span></em><span> max（30， vm memory in GiB））</span></p><p><span>Wait maximal timeout seconds. 等待最大超时秒数。</span></p></li></ul><p><strong><span>qm status</span></strong><span> </span><vmid><span> [OPTIONS]</span>
<strong><span>qm 状态</span></strong><span> </span><vmid><span> [选项]</span></p><p><span>Show VM status. 显示 VM 状态。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><span>--verbose </span><boolean><span> --详细 </span><boolean></p><p><span>Verbose output format 详细输出格式</span></p></li></ul><p><strong><span>qm stop</span></strong><span> </span><vmid><span> [OPTIONS]</span>
<strong><span>qm stop</span></strong><span> </span><vmid><span> [选项]</span></p><p><span>Stop virtual machine. The qemu process will exit immediately. This is akin to pulling the power plug of a running computer and may damage the VM data.</span>
<span>停止虚拟机。qemu 进程将立即退出。这类似于拔下正在运行的计算机的电源插头，可能会损坏 VM 数据。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><span>--keepActive </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --keepActive </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Do not deactivate storage volumes. 请勿停用存储卷。</span></p></li><li><p><span>--migratedfrom </span><string></p><p><span>The cluster node name. 群集节点名称。</span></p></li><li><p><span>--overrule-shutdown </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --overrule-shutdown </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Try to abort active </span><em><span>qmshutdown</span></em><span> tasks before stopping. 尝试在停止之前中止活动的 </span><em><span>qmshutdown</span></em><span> 任务。</span></p></li><li><p><span>--skiplock </span><boolean></p><p><span>Ignore locks - only root is allowed to use this option. 忽略锁 - 只允许 root 使用此选项。</span></p></li><li><p><span>--timeout </span><integer><span> (0 - N) --超时 </span><integer><span> （0 - N）</span></p><p><span>Wait maximal timeout seconds. 等待最大超时秒数。</span></p></li></ul><p><strong><span>qm suspend</span></strong><span> </span><vmid><span> [OPTIONS]</span>
<strong><span>qm suspend</span></strong><span> </span><vmid><span> [选项]</span></p><p><span>Suspend virtual machine. 挂起虚拟机。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><span>--skiplock </span><boolean></p><p><span>Ignore locks - only root is allowed to use this option. 忽略锁 - 只允许 root 使用此选项。</span></p></li><li><p><span>--statestorage </span><storage ID><span> --statestorage &lt;存储 ID&gt;</span></p><p><span>The storage for the VM state VM 状态的存储</span><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9YHhAIJFCExAsKUkE8IAFFPIDUIqhBRSDRBUqC%0ACimFFBCBpCWx02IaZ3G2SdyxPZ7vHh6+mcnSZnFjKIge6Wj8zYzvPf9z/me5d8TM+F8WfbkNuFx5%0ABcDLLf/fAEZGRmx4eNh6enqsp6fHhoeHbWRk5D9aFeSlVqHNmzfb6H33sHnT7ZQmD5GfOMax6Sm+%0APl5h1Yc+xpYtW2SBbX1ReUkRGBkZsdH77mHLW95EOv4Ms3ueJh6YYPHUFF9aljJ63z3cf//9/5FI%0AvKQIDA8P293L2yhVjjH7t51ocDiviFecF46n7XzBreChhx4qNhH5t0XjJUVgx44ddGUZ9b/vIpQD%0AoRQIWSDJAiFL6B9axo4dO4gxAmANWVDLG+Ln82URMRGhVCqRHxonlAPqFXWKC4r6IhI6OMjMzBN4%0A/4LlTUQQEZxzZ32QJAlpmrb+p16vU6vVOHXq1AWjN18AnDj0F971vrs4OnmYJVkoDA4FCPUO172I%0ACgnt7SV++4vvsGhRJx3tJbIsRVVpsUnOBBABBVFEClKYwbKr7sTM7EIUnBcA7z21k7t49x1X8JXv%0AbOWra7rw5QRtcN8PLCfvvZJvb9vJycpJp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KDA71FFBoAjIgQkVg/a5+oHrU5zIznDhxk964xKpXKggAoTlWW8+OfPorlOQ//cjsDy1bS2dFO%0AW+diVly1iL6+Pqanpzl5qsL4pPHwN3/G1InDlMsZ7Z1tDA30cfWqIa5dexV9fb2YnT7UTxw4xsHJ%0Ao4yOjfOP8QOMjx/k4OQx7r777lY0zycXvJ02M4sxMjg4SL1eR0TYsGEDw8PD9PX10d7ejogUN3a1%0AGqpKCIE8z5mdnUVVqVarbN++nba2Nvbu3csDDzyAqrJ8+atb+zjn6e/vZ/Xq1axatYq1a9fS29tL%0AlmUMDQ1RKpXOm9EXvV6v1+tWr9eZnp5mZmaGWq1GjLHF62aiNZ+bnPfe45xrvTZzxMyYmZk56+LX%0AzKjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"><span>Requires option(s): todisk 需要选项： todisk</span></p></li><li><p><span>--todisk </span><boolean><span> (</span><em><span>default =</span></em><span> 0) --todisk </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>If set, suspends the VM to disk. Will be resumed on next VM start. 如果设置，则将 VM 挂起到磁盘。将在下次启动 VM 时恢复。</span></p></li></ul><p><strong><span>qm template</span></strong><span> </span><vmid><span> [OPTIONS]</span>
<strong><span>qm 模板</span></strong><span> </span><vmid><span> [选项]</span></p><p><span>Create a Template. 创建模板。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><span>--disk &lt;efidisk0 | ide0 | ide1 | ide2 | ide3 | sata0 | sata1 | sata2 | sata3 | sata4 | sata5 | scsi0 | scsi1 | scsi10 | scsi11 | scsi12 | scsi13 | scsi14 | scsi15 | scsi16 | scsi17 | scsi18 | scsi19 | scsi2 | scsi20 | scsi21 | scsi22 | scsi23 | scsi24 | scsi25 | scsi26 | scsi27 | scsi28 | scsi29 | scsi3 | scsi30 | scsi4 | scsi5 | scsi6 | scsi7 | scsi8 | scsi9 | tpmstate0 | virtio0 | virtio1 | virtio10 | virtio11 | virtio12 | virtio13 | virtio14 | virtio15 | virtio2 | virtio3 | virtio4 | virtio5 | virtio6 | virtio7 | virtio8 | virtio9&gt; --磁盘</span></p><p><span>If you want to convert only 1 disk to base image. 如果您只想将 1 个磁盘转换为基础映像。</span></p></li></ul><p><strong><span>qm terminal</span></strong><span> </span><vmid><span> [OPTIONS]</span>
<strong><span>qm 终端</span></strong><span> </span><vmid><span> [选项]</span></p><p><span>Open a terminal using a serial device (The VM need to have a serial device configured, for example </span><em><span>serial0: socket</span></em><span>)</span>
<span>使用串行设备打开终端（VM 需要配置串行设备，例如 </span><em><span>serial0： socket</span></em><span>）</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><span>--escape </span><string><span> (</span><em><span>default =</span></em><span> ^O) --escape </span><string><span>（</span><em><span>默认值 =</span></em><span> ^O）</span></p><p><span>Escape character. 转义字符。</span></p></li><li><p><span>--iface &lt;serial0 | serial1 | serial2 | serial3&gt; --iface &lt;序列0 | 序列号1 | 序列号2 | 序列号3&gt;</span></p><p><span>Select the serial device. By default we simply use the first suitable device. 选择串行设备。默认情况下，我们只需使用第一个合适的设备。</span></p></li></ul><p><strong><span>qm unlink QM 取消链接</span></strong></p><p><span>An alias for </span><em><span>qm disk unlink</span></em><span>.</span>
<em><span>qm disk unlink</span></em><span> 的别名。</span></p><p><strong><span>qm unlock</span></strong><span> </span><vmid>
<strong><span>qm 解锁</span></strong><span> </span><vmid></p><p><span>Unlock the VM. 解锁 VM。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li></ul><p><strong><span>qm vncproxy</span></strong><span> </span><vmid></p><p><span>Proxy VM VNC traffic to stdin/stdout</span>
<span>代理到 stdin/stdout 的 VM VNC 流量</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li></ul><p><strong><span>qm wait</span></strong><span> </span><vmid><span> [OPTIONS]</span>
<strong><span>qm 等待</span></strong><span> </span><vmid><span> [选项]</span></p><p><span>Wait until the VM is stopped.</span>
<span>等待 VM 停止。</span></p><ul><li><p><vmid><span>: </span><integer><span> (100 - 999999999) </span><vmid><span>： </span><integer><span> （100 - 999999999）</span></p><p><span>The (unique) ID of the VM. VM 的（唯一）ID。</span></p></li><li><p><span>--timeout </span><integer><span> (1 - N) --超时 </span><integer><span> （1 - N）</span></p><p><span>Timeout in seconds. Default is to wait forever. 超时（以秒为单位）。默认设置是永远等待。</span></p></li></ul><h2 id='description-描述'><span>DESCRIPTION 描述</span></h2><p><span>QEMU (short form for Quick Emulator) is an open source hypervisor that emulates a physical computer. From the perspective of the host system where QEMU is running, QEMU is a user program which has access to a number of local resources like partitions, files, network cards which are then passed to an emulated computer which sees them as if they were real devices.</span>
<span>QEMU（Quick Emulator 的缩写）是一个模拟物理计算机的开源虚拟机管理程序。从 QEMU 运行的主机系统的角度来看，QEMU 是一个用户程序，它可以访问许多本地资源，如分区、文件、网卡，然后将它们传递给模拟计算机，该计算机将它们视为真实设备。</span></p><p><span>A guest operating system running in the emulated computer accesses these devices, and runs as if it were running on real hardware. For instance, you can pass an ISO image as a parameter to QEMU, and the OS running in the emulated computer will see a real CD-ROM inserted into a CD drive.</span>
<span>在模拟计算机中运行的客户机操作系统会访问这些设备，并像在真实硬件上运行一样运行。例如，您可以将 ISO 映像作为参数传递给 QEMU，在模拟计算机中运行的操作系统将看到将真实的 CD-ROM 插入到 CD 驱动器中。</span></p><p><span>QEMU can emulate a great variety of hardware from ARM to Sparc, but Proxmox VE is only concerned with 32 and 64 bits PC clone emulation, since it represents the overwhelming majority of server hardware. The emulation of PC clones is also one of the fastest due to the availability of processor extensions which greatly speed up QEMU when the emulated architecture is the same as the host architecture.</span>
<span>QEMU 可以模拟从 ARM 到 Sparc 的各种硬件，但 Proxmox VE 只涉及 32 位和 64 位 PC 克隆仿真，因为它代表了绝大多数服务器硬件。由于处理器扩展的可用性，PC 克隆的仿真也是最快的仿真之一，当仿真架构与主机架构相同时，这大大加快了 QEMU 的速度。</span></p><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9YHhAIJFCExAsKUkE8IAFFPIDUIqhBRSDRBUqC%0ACimFFBCBpCWx02IaZ3G2SdyxPZ7vHh6+mcnSZnFjKIge6Wj8zYzvPf9z/me5d8TM+F8WfbkNuFx5%0ABcDLLf/fAEZGRmx4eNh6enqsp6fHhoeHbWRk5D9aFeSlVqHNmzfb6H33sHnT7ZQmD5GfOMax6Sm+%0APl5h1Yc+xpYtW2SBbX1ReUkRGBkZsdH77mHLW95EOv4Ms3ueJh6YYPHUFF9aljJ63z3cf//9/5FI%0AvKQIDA8P293L2yhVjjH7t51ocDiviFecF46n7XzBreChhx4qNhH5t0XjJUVgx44ddGUZ9b/vIpQD%0AoRQIWSDJAiFL6B9axo4dO4gxAmANWVDLG+Ln82URMRGhVCqRHxonlAPqFXWKC4r6IhI6OMjMzBN4%0A/4LlTUQQEZxzZ32QJAlpmrb+p16vU6vVOHXq1AWjN18AnDj0F971vrs4OnmYJVkoDA4FCPUO172I%0ACgnt7SV++4vvsGhRJx3tJbIsRVVpsUnOBBABBVFEClKYwbK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33nsvX/z8XdSmj2AWOXhwkrxe46+79jB55Dh/3T2GxUhHextdXW2sXN7PNWtW%0AIQKDA71FFBoAjIgQkVg/a5+oHrU5zIznDhxk964xKpXKggAoTlWW8+OfPorlOQ//cjsDy1bS2dFO%0AW+diVly1iL6+Pqanpzl5qsL4pPHwN3/G1InDlMsZ7Z1tDA30cfWqIa5dexV9fb2YnT7UTxw4xsHJ%0Ao4yOjfOP8QOMjx/k4OQx7r777lY0zycXvJ02M4sxMjg4SL1eR0TYsGEDw8PD9PX10d7ejogUN3a1%0AGqpKCIE8z5mdnUVVqVarbN++nba2Nvbu3csDDzyAqrJ8+atb+zjn6e/vZ/Xq1axatYq1a9fS29tL%0AlmUMDQ1RKpXOm9EXvV6v1+tWr9eZnp5mZmaGWq1GjLHF62aiNZ+bnPfe45xrvTZzxMyYmZk56+LX%0AzKjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"></th><th><span>You may sometimes encounter the term </span><em><span>KVM</span></em><span> (Kernel-based Virtual Machine). It means that QEMU is running with the support of the virtualization processor extensions, via the Linux KVM module. In the context of Proxmox VE </span><em><span>QEMU</span></em><span> and </span><em><span>KVM</span></em><span> can be used interchangeably, as QEMU in Proxmox VE will always try to load the KVM module. 您有时可能会遇到术语 </span><em><span>KVM</span></em><span>（基于内核的虚拟机）。这意味着 QEMU 通过 Linux KVM 模块在虚拟化处理器扩展的支持下运行。在Proxmox VE的上下文中，</span><em><span>QEMU</span></em><span>和</span><em><span>KVM</span></em><span>可以互换使用，因为Proxmox VE中的QEMU将始终尝试加载KVM模块。</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><p><span>QEMU inside Proxmox VE runs as a root process, since this is required to access block and PCI devices.</span>
<span>Proxmox VE中的QEMU作为根进程运行，因为这是访问块和PCI设备所必需的。</span></p><h2 id='emulated-devices-and-paravirtualized-devices-模拟设备和半虚拟化设备'><span>Emulated devices and paravirtualized devices 模拟设备和半虚拟化设备</span></h2><p><span>The PC hardware emulated by QEMU includes a motherboard, network controllers, SCSI, IDE and SATA controllers, serial ports (the complete list can be seen in the kvm(1) man page) all of them emulated in software. All these devices are the exact software equivalent of existing hardware devices, and if the OS running in the guest has the proper drivers it will use the devices as if it were running on real hardware. This allows QEMU to run </span><em><span>unmodified</span></em><span> operating systems.</span>
<span>QEMU 模拟的 PC 硬件包括主板、网络控制器、SCSI、IDE 和 SATA 控制器、串行端口（完整列表可在 kvm（1） 手册页中看到），所有这些都是在软件中模拟的。所有这些设备都是与现有硬件设备完全相同的软件等效设备，如果客户机中运行的操作系统具有正确的驱动程序，它将使用这些设备，就像在真实硬件上运行一样。这使得 QEMU 可以运行</span><em><span>未经修改的</span></em><span>操作系统。</span></p><p><span>This however has a performance cost, as running in software what was meant to run in hardware involves a lot of extra work for the host CPU. To mitigate this, QEMU can present to the guest operating system </span><em><span>paravirtualized devices</span></em><span>, where the guest OS recognizes it is running inside QEMU and cooperates with the hypervisor.</span>
<span>然而，这会产生性能成本，因为在软件中运行本应在硬件中运行的内容会给主机 CPU 带来大量额外的工作。为了缓解这种情况，QEMU 可以向客户操作系统提供</span><em><span>半虚拟化设备</span></em><span>，客户操作系统会识别出它正在 QEMU 内部运行并与虚拟机管理程序合作。</span></p><p><span>QEMU relies on the virtio virtualization standard, and is thus able to present paravirtualized virtio devices, which includes a paravirtualized generic disk controller, a paravirtualized network card, a paravirtualized serial port, a paravirtualized SCSI controller, etc …</span>
<span>QEMU依赖于virtio虚拟化标准，因此能够呈现半虚拟化的virtio设备，其中包括半虚拟化的通用磁盘控制器、半虚拟化的网卡、半虚拟化的串行端口、半虚拟化的SCSI控制器等。</span></p><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAAD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HDBhYvXkwkEmHW%0ArFmEw2G3M1eyR1pWczcXIh6PMz4+zvbt2+ns7OS2+x6kanYdqjeA1xdAUb3IioIoSjg42JaJaejo%0AmTRaOoGeTiHJEvGxYd55rZP29nbWrl1LOBymqqqKyspKKioqyjK+bIBcCE3TSCaTxGIxenp62LVr%0AF11dXdTUL2BO/Xx8/goEUcSxbYSJ2EGS5IlzgnSC/r4PuXzmOEuXLmXlypXU19cTCoUIh8OEQqEr%0A7k5/7vOBdDpNMpkkkUiQSCTo7u7m6NGjnD59mv7+fqLRKIZhoCgKoVCI2tpampqaWLRoES0tLfh8%0APvx+P8FgkGAw+OWfD7gj94RG13U0TSOdTpNOp8lMbmQ0TcvbArrrK1mW8Xg8eL3e7BLB5/N9dSc0%0AuSP3jMwwjKy4G3AXwB0ugAsx5YzMndW//DOy3OFMjGwrxrKs7NX9LBfAneFFUcxec6rU5zqpvCqA%0AqTCT16/0nPgLA/i6xjf+Xw3+B2ll/uiqTaJTAAAAAElFTkSuQmCC" referrerpolicy="no-referrer" alt="Tip"></th><th><span>It is </span><strong><span>highly recommended</span></strong><span> to use the virtio devices whenever you can, as they provide a big performance improvement and are generally better maintained. Using the virtio generic disk controller versus an emulated IDE controller will double the sequential write throughput, as measured with bonnie++(8). Using the virtio network interface can deliver up to three times the throughput of an emulated Intel E1000 network card, as measured with iperf(1). [</span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnote_1'><span>1</span></a><span>] </span><strong><span>强烈建议</span></strong><span>尽可能使用 virtio 设备，因为它们提供了很大的性能改进，并且通常得到更好的维护。与模拟的 IDE 控制器相比，使用 virtio 通用磁盘控制器将使顺序写入吞吐量增加一倍，正如使用 bonnie++（8） 所测量的那样。使用 virtio 网络接口可以提供高达 3 倍于模拟 Intel E1000 网卡的吞吐量，如使用 iperf（1） 测量的那样。1]</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><h2 id='virtual-machines-settings-虚拟机设置'><span>Virtual Machines Settings 虚拟机设置</span></h2><p><span>Generally speaking Proxmox VE tries to choose sane defaults for virtual machines (VM). Make sure you understand the meaning of the settings you change, as it could incur a performance slowdown, or putting your data at risk.</span>
<span>一般来说，Proxmox VE尝试为虚拟机（VM）选择合理的默认值。请确保您了解所更改设置的含义，因为这可能会导致性能下降或使您的数据面临风险。</span></p><h3 id='general-settings-常规设置'><span>General Settings 常规设置 </span></h3><p><a href='https://pve.proxmox.com/pve-docs/images/screenshot/gui-create-vm-general.png'><img src="https://pve.proxmox.com/pve-docs/images/screenshot/gui-create-vm-general.png" referrerpolicy="no-referrer" alt="screenshot/gui-create-vm-general.png"></a></p><p><span>General settings of a VM include</span>
<span>VM 的常规设置包括</span></p><ul><li><p><span>the </span><strong><span>Node</span></strong><span> : the physical server on which the VM will run</span>
<strong><span>节点</span></strong><span> ：VM 将在其上运行的物理服务器</span></p></li><li><p><span>the </span><strong><span>VM ID</span></strong><span>: a unique number in this Proxmox VE installation used to identify your VM</span>
<strong><span>VM ID</span></strong><span>：此 Proxmox VE 安装中的唯一编号，用于识别您的 VM</span></p></li><li><p><strong><span>Name</span></strong><span>: a free form text string you can use to describe the VM</span>
<strong><span>名称</span></strong><span>：可用于描述 VM 的自由格式文本字符串</span></p></li><li><p><strong><span>Resource Pool</span></strong><span>: a logical group of VMs</span>
<strong><span>资源池</span></strong><span>：虚拟机的逻辑组</span></p></li></ul><h3 id='os-settings-操作系统设置'><span>OS Settings 操作系统设置 </span></h3><p><a href='https://pve.proxmox.com/pve-docs/images/screenshot/gui-create-vm-os.png'><img src="https://pve.proxmox.com/pve-docs/images/screenshot/gui-create-vm-os.png" referrerpolicy="no-referrer" alt="screenshot/gui-create-vm-os.png"></a></p><p><span>When creating a virtual machine (VM), setting the proper Operating System(OS) allows Proxmox VE to optimize some low level parameters. For instance Windows OS expect the BIOS clock to use the local time, while Unix based OS expect the BIOS clock to have the UTC time.</span>
<span>创建虚拟机 （VM） 时，设置适当的操作系统 （OS） 允许 Proxmox VE 优化一些低级参数。例如，Windows 操作系统期望 BIOS 时钟使用本地时间，而基于 Unix 的操作系统期望 BIOS 时钟具有 UTC 时间。</span></p><h3 id='system-settings-系统设置'><span>System Settings 系统设置 </span></h3><p><span>On VM creation you can change some basic system components of the new VM. You can specify which </span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_display'><span>display type</span></a><span> you want to use.</span>
<span>在创建 VM 时，您可以更改新 VM 的一些基本系统组件。您可以指定要使用的</span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_display'><span>显示类型</span></a><span>。</span></p><p><a href='https://pve.proxmox.com/pve-docs/images/screenshot/gui-create-vm-system.png'><img src="https://pve.proxmox.com/pve-docs/images/screenshot/gui-create-vm-system.png" referrerpolicy="no-referrer" alt="screenshot/gui-create-vm-system.png"></a></p><p><span>Additionally, the </span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_hard_disk'><span>SCSI controller</span></a><span> can be changed. If you plan to install the QEMU Guest Agent, or if your selected ISO image already ships and installs it automatically, you may want to tick the </span><em><span>QEMU Agent</span></em><span> box, which lets Proxmox VE know that it can use its features to show some more information, and complete some actions (for example, shutdown or snapshots) more intelligently.</span>
<span>此外，还可以更改 </span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_hard_disk'><span>SCSI 控制器</span></a><span>。如果您计划安装 QEMU Guest Agent，或者您选择的 ISO 镜像已经自动发货并安装，您可能需要勾选 </span><em><span>QEMU Agent</span></em><span> 框，让 Proxmox VE 知道它可以使用其功能来显示更多信息，并更智能地完成一些操作（例如，关闭或快照）。</span></p><p><span>Proxmox VE allows to boot VMs with different firmware and machine types, namely </span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_bios_and_uefi'><span>SeaBIOS and OVMF</span></a><span>. In most cases you want to switch from the default SeaBIOS to OVMF only if you plan to use </span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_pci_passthrough'><span>PCIe passthrough</span></a><span>.</span>
<span>Proxmox VE 允许启动具有不同固件和机器类型的虚拟机，即 </span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_bios_and_uefi'><span>SeaBIOS 和 OVMF</span></a><span>。在大多数情况下，仅当您计划使用 </span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_pci_passthrough'><span>PCIe 直通</span></a><span>时，才希望从默认的 SeaBIOS 切换到 OVMF。</span></p><h4 id='machine-type-机器类型'><span>Machine Type 机器类型</span></h4><p><span>A VM’s </span><em><span>Machine Type</span></em><span> defines the hardware layout of the VM’s virtual motherboard. You can choose between the default </span><a href='https://en.wikipedia.org/wiki/Intel_440FX'><span>Intel 440FX</span></a><span> or the </span><a href='https://ark.intel.com/content/www/us/en/ark/products/31918/intel-82q35-graphics-and-memory-controller.html'><span>Q35</span></a><span> chipset, which also provides a virtual PCIe bus, and thus may be desired if you want to pass through PCIe hardware. Additionally, you can select a </span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_pci_viommu'><span>vIOMMU</span></a><span> implementation.</span>
<span>VM 的</span><em><span>计算机类型</span></em><span>定义了 VM 的虚拟主板的硬件布局。您可以选择默认的 </span><a href='https://en.wikipedia.org/wiki/Intel_440FX'><span>Intel 440FX</span></a><span> 或 </span><a href='https://ark.intel.com/content/www/us/en/ark/products/31918/intel-82q35-graphics-and-memory-controller.html'><span>Q35</span></a><span> 芯片组，它们还提供虚拟 PCIe 总线，因此如果您想通过 PCIe 硬件，可能需要这样做。此外，您还可以选择 </span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_pci_viommu'><span>vIOMMU</span></a><span> 实现。</span></p><h5 id='machine-version-计算机版本'><span>Machine Version 计算机版本</span></h5><p><span>Each machine type is versioned in QEMU and a given QEMU binary supports many machine versions. New versions might bring support for new features, fixes or general improvements. However, they also change properties of the virtual hardware. To avoid sudden changes from the guest’s perspective and ensure compatibility of the VM state, live-migration and snapshots with RAM will keep using the same machine version in the new QEMU instance.</span>
<span>每种机器类型都在 QEMU 中进行版本控制，并且给定的 QEMU 二进制文件支持许多机器版本。新版本可能会带来对新功能、修复或常规改进的支持。但是，它们也会更改虚拟硬件的属性。为了避免从客户的角度来看突然发生变化，并确保虚拟机状态的兼容性，实时迁移和带有 RAM 的快照将在新的 QEMU 实例中保持使用相同的机器版本。</span></p><p><span>For Windows guests, the machine version is pinned during creation, because Windows is sensitive to changes in the virtual hardware - even between cold boots. For example, the enumeration of network devices might be different with different machine versions. Other OSes like Linux can usually deal with such changes just fine. For those, the </span><em><span>Latest</span></em><span> machine version is used by default. This means that after a fresh start, the newest machine version supported by the QEMU binary is used (e.g. the newest machine version QEMU 8.1 supports is version 8.1 for each machine type).</span>
<span>对于 Windows 客户机，计算机版本在创建过程中会固定，因为 Windows 对虚拟硬件中的更改很敏感 - 即使在冷启动之间也是如此。例如，对于不同的计算机版本，网络设备的枚举可能会有所不同。其他操作系统（如 Linux）通常可以很好地处理此类更改。对于这些，默认情况下使用</span><em><span>最新的</span></em><span>计算机版本。这意味着在重新启动后，将使用 QEMU 二进制文件支持的最新机器版本（例如，QEMU 8.1 支持的最新机器版本是每种机器类型的 8.1 版本）。</span></p><h5 id='update-to-a-newer-machine-version-更新到较新的计算机版本'><span>Update to a Newer Machine Version 更新到较新的计算机版本</span></h5><p><span>Very old machine versions might become deprecated in QEMU. For example, this is the case for versions 1.4 to 1.7 for the i440fx machine type. It is expected that support for these machine versions will be dropped at some point. If you see a deprecation warning, you should change the machine version to a newer one. Be sure to have a working backup first and be prepared for changes to how the guest sees hardware. In some scenarios, re-installing certain drivers might be required. You should also check for snapshots with RAM that were taken with these machine versions (i.e. the runningmachine configuration entry). Unfortunately, there is no way to change the machine version of a snapshot, so you’d need to load the snapshot to salvage any data from it.</span>
<span>非常旧的计算机版本可能会在 QEMU 中被弃用。例如，i440fx 机器类型的版本 1.4 到 1.7 就是这种情况。预计在某个时候将放弃对这些计算机版本的支持。如果看到弃用警告，则应将计算机版本更改为较新的版本。请务必首先有一个有效的备份，并为客人查看硬件的方式发生变化做好准备。在某些情况下，可能需要重新安装某些驱动程序。您还应该检查使用这些机器版本（即 runningmachine 配置条目）拍摄的带有 RAM 的快照。遗憾的是，无法更改快照的计算机版本，因此您需要加载快照以从中挽救任何数据。</span></p><h3 id='hard-disk-硬盘'><span>Hard Disk 硬盘 </span></h3><h4 id='buscontroller-总线控制器'><span>Bus/Controller 总线/控制器</span></h4><p><span>QEMU can emulate a number of storage controllers:</span>
<span>QEMU 可以模拟许多存储控制器：</span></p><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAKZUlEQVRoge2aa3BU5RmAn3Pbs7fs%0AJmwCRGITk0hVLFAtNWoq6pAiU0cKaYfa6ShT+YN4YbQw9F/8QX+UMv6gM3Q6oxMV6TgIbe10Gq2g%0AcSzDpRaFgmIk4SKB3LP3Pff+SM66m+xuFvEyzvSbeefsbva8+z7nvXzf934RHMfhmzzEr9uAqx3/%0AB/i6xzceQP6iFDmT1cBxHNzCkFsgBEHIXnNeC1f7u1cN4DiOY9s2rliWhWVZWRDHcbJGC4KAJElI%0AkoQoioii6IiieFUgnxvAtm3HNdg0Tbq6uuju7ubYsWP09vYyMjKCpmmoqkokEqGhoYGFCxfS2tpK%0AW1sbiqJkRZIkZxLoikGEK50H3CdumiZ9fX3s3LmT3bt3U1V3A0033cKc2nkEQxV4PSqSJOI4Dpqu%0Ak0gkGLx8kZ4T7zF87iSrV69m3bp1NDY2oqoqHo8HWZa5Uo9cEYBt245lWRiGQUdHB9u2beOe1Y8w%0A/6bFVAT9xJJpYvEUiVSGjG5gmBY4DqIoonoUfF4PoYAfRRE5/8kp3njlD6xfv54tW7YQCATw+Xyu%0AR8r2RtkAtm07pmly5MgRHn/8cZSaZpbcfjd+n5f+wVEGRqJkdCMv3vME8t77vB6qQn4+OX6YsXPH%0A2bp1Ky0tLQQCAVRVdb0xI0RZZdQ1ft++fSxbtozrlqzgrnvvI5nRee9UL+f6h9B0A1EQEIsBiO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3B5%0AeBzdMNl/+CSmZReN+0wqztDFs4iSxIE9O9mwYQPhcJhwOEwgEMhN4GkEZXUlYrEYe/bs4elfbWLF%0AQ5tQKyJlVaRy+kSJ6AhjA58iihJdf9rBUxufYPny5cyZM6esrkTJxpabzIFAgFWrVmHbNps3b+bu%0An6wnVF2H4lHLmlULgZiGTmxkgGR8DNu2efOV3/PUxo20tbURiUSorKwkEAhkk7fYmLE36rZX0uk0%0A0WiUgwcP0tHRQcW8G5ndsIBgaBYe1TvtyRYDMXWNZGyU+Ngwkiwz+GkfQ73vsWHDBhYvXkwkEmHW%0ArFmEw2G3M1eyR1pWczcXIh6PMz4+zvbt2+ns7OS2+x6kanYdqjeA1xdAUb3IioIoSjg42JaJaejo%0AmTRaOoGeTiHJEvGxYd55rZP29nbWrl1LOBymqqqKyspKKioqyjK+bIBcCE3TSCaTxGIxenp62LVr%0AF11dXdTUL2BO/Xx8/goEUcSxbYSJ2EGS5IlzgnSC/r4PuXzmOEuXLmXlypXU19cTCoUIh8OEQqEr%0A7k5/7vOBdDpNMpkkkUiQSCTo7u7m6NGjnD59mv7+fqLRKIZhoCgKoVCI2tpampqaWLRoES0tLfh8%0APvx+P8FgkGAw+OWfD7gj94RG13U0TSOdTpNOp8lMbmQ0TcvbArrrK1mW8Xg8eL3e7BLB5/N9dSc0%0AuSP3jMwwjKy4G3AXwB0ugAsx5YzMndW//DOy3OFMjGwrxrKs7NX9LBfAneFFUcxec6rU5zqpvCqA%0AqTCT16/0nPgLA/i6xjf+Xw3+B2ll/uiqTaJTAAAAAElFTkSuQmCC" referrerpolicy="no-referrer" alt="Tip"></th><th><span>It is highly recommended to use the </span><strong><span>VirtIO SCSI</span></strong><span> or </span><strong><span>VirtIO Block</span></strong><span> controller for performance reasons and because they are better maintained. 出于性能原因，强烈建议使用 </span><strong><span>VirtIO SCSI</span></strong><span> 或 </span><strong><span>VirtIO 块</span></strong><span>控制器，因为它们可以更好地维护。</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><ul><li><p><span>the </span><strong><span>IDE</span></strong><span> controller, has a design which goes back to the 1984 PC/AT disk controller. Even if this controller has been superseded by recent designs, each and every OS you can think of has support for it, making it a great choice if you want to run an OS released before 2003. You can connect up to 4 devices on this controller.</span>
<strong><span>IDE</span></strong><span> 控制器的设计可以追溯到 1984 年的 PC/AT 磁盘控制器。即使这个控制器已经被最近的设计所取代，你能想到的每一个操作系统都支持它，如果你想运行2003年之前发布的操作系统，它是一个不错的选择。您最多可以在此控制器上连接 4 个设备。</span></p></li><li><p><span>the </span><strong><span>SATA</span></strong><span> (Serial ATA) controller, dating from 2003, has a more modern design, allowing higher throughput and a greater number of devices to be connected. You can connect up to 6 devices on this controller.</span>
<strong><span>SATA</span></strong><span>（串行 ATA）控制器可追溯到 2003 年，具有更现代的设计，允许更高的吞吐量和更多的设备连接。您可以在此控制器上连接最多 6 个设备。</span></p></li><li><p><span>the </span><strong><span>SCSI</span></strong><span> controller, designed in 1985, is commonly found on server grade hardware, and can connect up to 14 storage devices. Proxmox VE emulates by default a LSI 53C895A controller.</span>
<strong><span>SCSI</span></strong><span> 控制器设计于 1985 年，通常用于服务器级硬件，最多可连接 14 个存储设备。默认情况下，Proxmox VE 模拟 LSI 53C895A 控制器。</span></p><p><span>A SCSI controller of type </span><em><span>VirtIO SCSI single</span></em><span> and enabling the </span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_hard_disk_iothread'><span>IO Thread</span></a><span> setting for the attached disks is recommended if you aim for performance. This is the default for newly created Linux VMs since Proxmox VE 7.3. Each disk will have its own </span><em><span>VirtIO SCSI</span></em><span> controller, and QEMU will handle the disks IO in a dedicated thread. Linux distributions have support for this controller since 2012, and FreeBSD since 2014. For Windows OSes, you need to provide an extra ISO containing the drivers during the installation.</span>
<span>如果您的目标是性能，建议使用 </span><em><span>VirtIO SCSI single</span></em><span> 类型的 SCSI 控制器，并为连接的磁盘启用 </span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_hard_disk_iothread'><span>IO 线程</span></a><span>设置。这是自 Proxmox VE 7.3 以来新创建的 Linux VM 的默认设置。每个磁盘都有自己的 </span><em><span>VirtIO SCSI</span></em><span> 控制器，QEMU 将在专用线程中处理磁盘 IO。Linux 发行版自 2012 年起支持此控制器，FreeBSD 自 2014 年起支持此控制器。对于 Windows 操作系统，您需要在安装过程中提供包含驱动程序的额外 ISO。</span></p></li><li><p><span>The </span><strong><span>VirtIO Block</span></strong><span> controller, often just called VirtIO or virtio-blk, is an older type of paravirtualized controller. It has been superseded by the VirtIO SCSI Controller, in terms of features.</span>
<strong><span>VirtIO 块</span></strong><span>控制器，通常简称为 VirtIO 或 virtio-blk，是一种较旧的半虚拟化控制器。就功能而言，它已被 VirtIO SCSI 控制器取代。</span></p></li></ul><h4 id='image-format-图像格式'><span>Image Format 图像格式</span></h4><p><span>On each controller you attach a number of emulated hard disks, which are backed by a file or a block device residing in the configured storage. The choice of a storage type will determine the format of the hard disk image. Storages which present block devices (LVM, ZFS, Ceph) will require the </span><strong><span>raw disk image format</span></strong><span>, whereas files based storages (Ext4, NFS, CIFS, GlusterFS) will let you to choose either the </span><strong><span>raw disk image format</span></strong><span> or the </span><strong><span>QEMU image format</span></strong><span>.</span>
<span>在每个控制器上，您都连接了多个模拟硬盘，这些硬盘由位于配置存储中的文件或块设备提供支持。存储类型的选择将决定硬盘映像的格式。提供块设备的存储（LVM、ZFS、Ceph）将需要</span><strong><span>原始磁盘映像格式</span></strong><span>，而基于文件的存储（Ext4、NFS、CIFS、GlusterFS）将允许您选择</span><strong><span>原始磁盘映像格式</span></strong><span>或 </span><strong><span>QEMU 映像格式</span></strong><span>。</span></p><ul><li><p><span>the </span><strong><span>QEMU image format</span></strong><span> is a copy on write format which allows snapshots, and thin provisioning of the disk image.</span>
<strong><span>QEMU 镜像格式</span></strong><span>是写入时复制的格式，允许快照和磁盘镜像的精简配置。</span></p></li><li><p><span>the </span><strong><span>raw disk image</span></strong><span> is a bit-to-bit image of a hard disk, similar to what you would get when executing the dd command on a block device in Linux. This format does not support thin provisioning or snapshots by itself, requiring cooperation from the storage layer for these tasks. It may, however, be up to 10% faster than the </span><strong><span>QEMU image format</span></strong><span>. [</span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnote_2'><span>2</span></a><span>]</span>
<strong><span>原始磁盘映像</span></strong><span>是硬盘的位到位映像，类似于在 Linux 中的块设备上执行 dd 命令时获得的映像。此格式本身不支持精简配置或快照，需要存储层的协作才能完成这些任务。但是，它可能比 </span><strong><span>QEMU 图像格式</span></strong><span>快 10%。2]</span></p></li><li><p><span>the </span><strong><span>VMware image format</span></strong><span> only makes sense if you intend to import/export the disk image to other hypervisors.</span>
<span>仅当您打算将磁盘映像导入/导出到其他虚拟机管理程序时，</span><strong><span>VMware 映像格式</span></strong><span>才有意义。</span></p></li></ul><h4 id='cache-mode-缓存模式'><span>Cache Mode 缓存模式</span></h4><p><span>Setting the </span><strong><span>Cache</span></strong><span> mode of the hard drive will impact how the host system will notify the guest systems of block write completions. The </span><strong><span>No cache</span></strong><span> default means that the guest system will be notified that a write is complete when each block reaches the physical storage write queue, ignoring the host page cache. This provides a good balance between safety and speed.</span>
<span>设置硬盘驱动器的</span><strong><span>缓存</span></strong><span>模式将影响主机系统通知客户系统块写入完成的方式。</span><strong><span>无缓存</span></strong><span>默认值意味着当每个块到达物理存储写入队列时，客户系统将收到写入完成的通知，而忽略主机页面缓存。这在安全性和速度之间提供了良好的平衡。</span></p><p><span>If you want the Proxmox VE backup manager to skip a disk when doing a backup of a VM, you can set the </span><strong><span>No backup</span></strong><span> option on that disk.</span>
<span>如果您希望Proxmox VE备份管理器在备份VM时跳过磁盘，则可以在该磁盘上设置</span><strong><span>“无备份</span></strong><span>”选项。</span></p><p><span>If you want the Proxmox VE storage replication mechanism to skip a disk when starting a replication job, you can set the </span><strong><span>Skip replication</span></strong><span> option on that disk. As of Proxmox VE 5.0, replication requires the disk images to be on a storage of type zfspool, so adding a disk image to other storages when the VM has replication configured requires to skip replication for this disk image.</span>
<span>如果您希望 Proxmox VE 存储复制机制在启动复制作业时跳过磁盘，您可以在该磁盘上设置</span><strong><span>跳过复制</span></strong><span>选项。从 Proxmox VE 5.0 开始，复制要求磁盘映像位于 zfspool 类型的存储上，因此在 VM 配置了复制时将磁盘映像添加到其他存储需要跳过此磁盘映像的复制。</span></p><h4 id='trimdiscard-修剪丢弃'><span>Trim/Discard 修剪/丢弃</span></h4><p><span>If your storage supports </span><em><span>thin provisioning</span></em><span> (see the storage chapter in the Proxmox VE guide), you can activate the </span><strong><span>Discard</span></strong><span> option on a drive. With </span><strong><span>Discard</span></strong><span> set and a </span><em><span>TRIM</span></em><span>-enabled guest OS [</span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnote_3'><span>3</span></a><span>], when the VM’s filesystem marks blocks as unused after deleting files, the controller will relay this information to the storage, which will then shrink the disk image accordingly. For the guest to be able to issue </span><em><span>TRIM</span></em><span> commands, you must enable the </span><strong><span>Discard</span></strong><span> option on the drive. Some guest operating systems may also require the </span><strong><span>SSD Emulation</span></strong><span> flag to be set. Note that </span><strong><span>Discard</span></strong><span> on </span><strong><span>VirtIO Block</span></strong><span> drives is only supported on guests using Linux Kernel 5.0 or higher.</span>
<span>如果您的存储支持</span><em><span>精简配置</span></em><span>（请参阅 Proxmox VE 指南中的存储章节），您可以在驱动器上</span><strong><span>激活丢弃选项</span></strong><span>。在设置</span><strong><span>了 Discard</span></strong><span> 且启用了 </span><em><span>TRIM</span></em><span> 的客户机操作系统 3]的情况下，当虚拟机的文件系统在删除文件后将块标记为未使用时，控制器会将此信息中继到存储，然后存储将相应地缩小磁盘映像。要使客户机能够发出 </span><em><span>TRIM</span></em><span> 命令，您必须在驱动器上启用 </span><strong><span>Discard （丢弃</span></strong><span>） 选项。某些客户机操作系统可能还需要设置 </span><strong><span>SSD 仿真</span></strong><span>标志。请注意，仅在使用 Linux 内核 5.0 或更高版本的客户机上支持在 </span><strong><span>VirtIO 块</span></strong><span>驱动器上</span><strong><span>丢弃</span></strong><span>。</span></p><p><span>If you would like a drive to be presented to the guest as a solid-state drive rather than a rotational hard disk, you can set the </span><strong><span>SSD emulation</span></strong><span> option on that drive. There is no requirement that the underlying storage actually be backed by SSDs; this feature can be used with physical media of any type. Note that </span><strong><span>SSD emulation</span></strong><span> is not supported on </span><strong><span>VirtIO Block</span></strong><span> drives.</span>
<span>如果您希望将驱动器作为固态驱动器而不是旋转硬盘呈现给客户机，则可以在该驱动器上设置 </span><strong><span>SSD 仿真</span></strong><span>选项。没有要求底层存储实际上由 SSD 提供支持;此功能可用于任何类型的物理媒体。请注意，</span><strong><span>VirtIO 块</span></strong><span>驱动器不支持 </span><strong><span>SSD 仿真</span></strong><span>。</span></p><h4 id='io-thread-io-线程'><span>IO Thread IO 线程</span></h4><p><span>The option </span><strong><span>IO Thread</span></strong><span> can only be used when using a disk with the </span><strong><span>VirtIO</span></strong><span> controller, or with the </span><strong><span>SCSI</span></strong><span> controller, when the emulated controller type is </span><strong><span>VirtIO SCSI single</span></strong><span>. With </span><strong><span>IO Thread</span></strong><span> enabled, QEMU creates one I/O thread per storage controller rather than handling all I/O in the main event loop or vCPU threads. One benefit is better work distribution and utilization of the underlying storage. Another benefit is reduced latency (hangs) in the guest for very I/O-intensive host workloads, since neither the main thread nor a vCPU thread can be blocked by disk I/O.</span>
<span>仅当将磁盘与 </span><strong><span>VirtIO</span></strong><span> 控制器一起使用时，或者当模拟控制器类型为 </span><strong><span>VirtIO SCSI single</span></strong><span> 时，才能使用 </span><strong><span>IO Thread</span></strong><span> 选项。启用 </span><strong><span>IO 线程</span></strong><span>后，QEMU 会为每个存储控制器创建一个 I/O 线程，而不是处理主事件循环或 vCPU 线程中的所有 I/O 。一个好处是更好地分配工作并利用底层存储。另一个好处是减少了 I/O 密集型主机工作负载的客户机中的延迟（挂起），因为磁盘 I/O 都不会阻塞主线程和 vCPU 线程。</span></p><h3 id='cpu-中央处理器'><span>CPU 中央处理器 </span></h3><p><a href='https://pve.proxmox.com/pve-docs/images/screenshot/gui-create-vm-cpu.png'><img src="https://pve.proxmox.com/pve-docs/images/screenshot/gui-create-vm-cpu.png" referrerpolicy="no-referrer" alt="screenshot/gui-create-vm-cpu.png"></a></p><p><span>A </span><strong><span>CPU socket</span></strong><span> is a physical slot on a PC motherboard where you can plug a CPU. This CPU can then contain one or many </span><strong><span>cores</span></strong><span>, which are independent processing units. Whether you have a single CPU socket with 4 cores, or two CPU sockets with two cores is mostly irrelevant from a performance point of view. However some software licenses depend on the number of sockets a machine has, in that case it makes sense to set the number of sockets to what the license allows you.</span>
<strong><span>CPU 插槽</span></strong><span>是 PC 主板上的一个物理插槽，您可以在其中插入 CPU。然后，此 CPU 可以包含一个或多个内核，这些</span><strong><span>内核</span></strong><span>是独立的处理单元。从性能的角度来看，您是有一个 4 个内核的 CPU 插槽，还是两个两个内核的 CPU 插槽，这几乎无关紧要。但是，某些软件许可证取决于计算机具有的插槽数量，在这种情况下，将插槽数量设置为许可证允许您的数量是有意义的。</span></p><p><span>Increasing the number of virtual CPUs (cores and sockets) will usually provide a performance improvement though that is heavily dependent on the use of the VM. Multi-threaded applications will of course benefit from a large number of virtual CPUs, as for each virtual cpu you add, QEMU will create a new thread of execution on the host system. If you’re not sure about the workload of your VM, it is usually a safe bet to set the number of </span><strong><span>Total cores</span></strong><span> to 2.</span>
<span>增加虚拟 CPU（内核和插槽）的数量通常会提供性能改进，尽管这在很大程度上取决于 VM 的使用。多线程应用程序当然会从大量的虚拟 CPU 中受益，因为对于您添加的每个虚拟 CPU，QEMU 将在主机系统上创建一个新的执行线程。如果不确定 VM 的工作负载，通常可以将 </span><strong><span>Total core</span></strong><span> 数设置为 2。</span></p><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9Y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zqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"></th><th><span>It is perfectly safe if the </span><em><span>overall</span></em><span> number of cores of all your VMs is greater than the number of cores on the server (for example, 4 VMs each with 4 cores (= total 16) on a machine with only 8 cores). In that case the host system will balance the QEMU execution threads between your server cores, just like if you were running a standard multi-threaded application. However, Proxmox VE will prevent you from starting VMs with more virtual CPU cores than physically available, as this will only bring the performance down due to the cost of context switches. 如果所有 VM 的核心</span><em><span>总数</span></em><span>大于服务器上的核心数（例如，在只有 8 个核心的计算机上，有 4 个 VM，每个 VM 有 4 个核心（= 总共 16 个），则这是完全安全的。在这种情况下，主机系统将在服务器核心之间平衡 QEMU 执行线程，就像您运行标准的多线程应用程序一样。但是，Proxmox VE 将阻止您启动具有比物理可用虚拟 CPU 核心更多的虚拟机，因为这只会由于上下文切换的成本而降低性能。</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><h4 id='resource-limits-资源限制'><span>Resource Limits 资源限制</span></h4><p><strong><span>cpulimit CPU限制</span></strong></p><p><span>In addition to the number of virtual cores, the total available “Host CPU Time” for the VM can be set with the </span><strong><span>cpulimit</span></strong><span> option. It is a floating point value representing CPU time in percent, so 1.0 is equal to 100%, 2.5 to 250% and so on. If a single process would fully use one single core it would have 100% CPU Time usage. If a VM with four cores utilizes all its cores fully it would theoretically use 400%. In reality the usage may be even a bit higher as QEMU can have additional threads for VM peripherals besides the vCPU core ones.</span>
<span>除了虚拟核心的数量外，还可以使用 </span><strong><span>cpulimit</span></strong><span> 选项设置 VM 的总可用“主机 CPU 时间”。它是一个浮点值，以百分比表示 CPU 时间，因此 1.0 等于 100%，2.5 到 250% 等。如果单个进程完全使用一个内核，则它将具有 100% 的 CPU 时间使用率。如果具有四个核心的 VM 充分利用其所有核心，理论上它将使用 400%。实际上，使用率可能更高一些，因为除了 vCPU 核心之外，QEMU 还可以为 VM 外围设备提供额外的线程。</span></p><p><span>This setting can be useful when a VM should have multiple vCPUs because it is running some processes in parallel, but the VM as a whole should not be able to run all vCPUs at 100% at the same time.</span>
<span>当 VM 应具有多个 vCPU 时，此设置非常有用，因为它并行运行某些进程，但整个 VM 不应能够同时 100% 运行所有 vCPU。</span></p><p><span>For example, suppose you have a virtual machine that would benefit from having 8 virtual CPUs, but you don’t want the VM to be able to max out all 8 cores running at full load - because that would overload the server and leave other virtual machines and containers with too little CPU time. To solve this, you could set </span><strong><span>cpulimit</span></strong><span> to 4.0 (=400%). This means that if the VM fully utilizes all 8 virtual CPUs by running 8 processes simultaneously, each vCPU will receive a maximum of 50% CPU time from the physical cores. However, if the VM workload only fully utilizes 4 virtual CPUs, it could still receive up to 100% CPU time from a physical core, for a total of 400%.</span>
<span>例如，假设您有一个虚拟机，该虚拟机将受益于拥有 8 个虚拟 CPU，但您不希望 VM 能够在满负荷下最大化运行的所有 8 个核心 - 因为这会导致服务器过载，并使其他虚拟机和容器的 CPU 时间太少。要解决此问题，您可以将 </span><strong><span>cpulimit</span></strong><span> 设置为 4.0 （=400%）。这意味着，如果 VM 通过同时运行 8 个进程来充分利用所有 8 个虚拟 CPU，则每个 vCPU 将从物理内核接收最多 50% 的 CPU 时间。但是，如果 VM 工作负载仅充分利用 4 个虚拟 CPU，则它仍然可以从物理核心接收高达 100% 的 CPU 时间，总共 400%。</span></p><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9YHhAIJFCExAsKUkE8IAFFPIDUIqhBRSDRBUqC%0ACimFFBCBpCWx02IaZ3G2SdyxPZ7vHh6+mcnSZnFjKIge6Wj8zYzvPf9z/me5d8TM+F8WfbkNuFx5%0ABcDLLf/fAEZGRmx4eNh6enqsp6f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%0AUowECKqK4RBxoE0W6gvGCcEjaOEAwEQWdpgbGxujt7erOLO2mk3R8i0Wz9EiuUGz+qlKEQEUaJbI%0A4lTHmTVePKgWzpDGJGpc8CDTlEsuo88++wxXDA0UIUbAOP23KGZKjI48KnkuhcbiPbPCOBoeBikO%0ALk2VxjqNRilaAEqSZGEAbN261bZt+zW33XY7IAXXm6Ou0YhIMamaaUOl5WRrzg00viuKWWxpQUOH%0ANAZFQRpD48Xlkig0MTHBB95zG+VSylz1KCbWyDOh2XyK+56IqjWMKigkUnzWnPPFFFRRLZ29SQRU%0AELOGY4pZ6LKOlM07mZ07d/KOtw1TcB4sGkTDiDQ9K1IkrKeYmQC08d7pZLSiRBpE5s7aS0XAHFEK%0AAGY51Wr18g80Zmb33nsvX/z8XdSmj2AWOXhwkrxe46+79jB55Dh/3T2GxUhHextdXW2sXN7PNWtW%0AIQKDA71FFBoAjIgQkVg/a5+oHrU5zIznDhxk964xKpXKggAoTlWW8+OfPorlOQ//cjsDy1bS2dFO%0AW+diVly1iL6+Pqanpzl5qsL4pPHwN3/G1InDlMsZ7Z1tDA30cfWqIa5dexV9fb2YnT7UTxw4xsHJ%0Ao4yOjfOP8QOMjx/k4OQx7r777lY0zycXvJ02M4sxMjg4SL1eR0TYsGEDw8PD9PX10d7ejogUN3a1%0AGqpKCIE8z5mdnUVVqVarbN++nba2Nvbu3csDDzyAqrJ8+atb+zjn6e/vZ/Xq1axatYq1a9fS29tL%0AlmUMDQ1RKpXOm9EXvV6v1+tWr9eZnp5mZmaGWq1GjLHF62aiNZ+bnPfe45xrvTZzxMyYmZk56+LX%0AzKjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"></th><th><span>VMs can, depending on their configuration, use additional threads, such as for networking or IO operations but also live migration. Thus a VM can show up to use more CPU time than just its virtual CPUs could use. To ensure that a VM never uses more CPU time than vCPUs assigned, set the </span><strong><span>cpulimit</span></strong><span> to the same value as the total core count. 根据其配置，VM 可以使用其他线程，例如用于网络或 IO 操作，以及实时迁移。因此，VM 可能会显示为使用比其虚拟 CPU 可以使用的更多 CPU 时间。要确保 VM 使用的 CPU 时间永远不会超过分配的 vCPU，请将 </span><strong><span>cpulimit</span></strong><span> 设置为与核心总数相同的值。</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><p><strong><span>cpuunits CPUU单位</span></strong></p><p><span>With the </span><strong><span>cpuunits</span></strong><span> option, nowadays often called CPU shares or CPU weight, you can control how much CPU time a VM gets compared to other running VMs. It is a relative weight which defaults to 100 (or 1024 if the host uses legacy cgroup v1). If you increase this for a VM it will be prioritized by the scheduler in comparison to other VMs with lower weight.</span>
<span>使用 </span><strong><span>cpuunits</span></strong><span> 选项（现在通常称为 CPU 份额或 CPU 权重），您可以控制与其他正在运行的 VM 相比，VM 获得的 CPU 时间。它是一个相对权重，默认为 100（如果主机使用旧版 cgroup v1，则为 1024）。如果为 VM 增加此设置，则与权重较低的其他 VM 相比，计划程序将优先考虑该 VM。</span></p><p><span>For example, if VM 100 has set the default 100 and VM 200 was changed to 200, the latter VM 200 would receive twice the CPU bandwidth than the first VM 100.</span>
<span>例如，如果 VM 100 设置了默认值 100，而 VM 200 更改为 200，则后一个 VM 200 将接收比第一个 VM 100 两倍的 CPU 带宽。</span></p><p><span>For more information see man systemd.resource-control, here CPUQuota corresponds to cpulimit and CPUWeight to our cpuunits setting. Visit its Notes section for references and implementation details.</span>
<span>有关更多信息，请参见 man systemd.resource-control，此处 CPUQuota 对应于 cpulimit，而 CPUWeight 对应于我们的 cpuunits 设置。请访问其“注释”部分，了解参考资料和实施详细信息。</span></p><p><strong><span>affinity 亲和力</span></strong></p><p><span>With the </span><strong><span>affinity</span></strong><span> option, you can specify the physical CPU cores that are used to run the VM’s vCPUs. Peripheral VM processes, such as those for I/O, are not affected by this setting. Note that the </span><strong><span>CPU affinity is not a security feature</span></strong><span>.</span>
<span>使用 </span><strong><span>affinity</span></strong><span> 选项，您可以指定用于运行 VM 的 vCPU 的物理 CPU 核心。外围 VM 进程（例如用于 I/O 的进程）不受此设置的影响。请注意，</span><strong><span>CPU 关联性不是安全功能</span></strong><span>。</span></p><p><span>Forcing a CPU </span><strong><span>affinity</span></strong><span> can make sense in certain cases but is accompanied by an increase in complexity and maintenance effort. For example, if you want to add more VMs later or migrate VMs to nodes with fewer CPU cores. It can also easily lead to asynchronous and therefore limited system performance if some CPUs are fully utilized while others are almost idle.</span>
<span>在某些情况下，强制 CPU </span><strong><span>关联</span></strong><span>是有意义的，但伴随着复杂性和维护工作量的增加。例如，如果希望稍后添加更多 VM，或将 VM 迁移到 CPU 核心较少的节点。如果某些 CPU 被充分利用而其他 CPU 几乎处于空闲状态，则也很容易导致异步，从而限制系统性能。</span></p><p><span>The </span><strong><span>affinity</span></strong><span> is set through the taskset CLI tool. It accepts the host CPU numbers (see lscpu) in the List Format from man cpuset. This ASCII decimal list can contain numbers but also number ranges. For example, the </span><strong><span>affinity</span></strong><span> 0-1,8-11 (expanded 0, 1, 8, 9, 10, 11) would allow the VM to run on only these six specific host cores.</span>
<strong><span>关联</span></strong><span>是通过任务集 CLI 工具设置的。它接受来自 man cpuset 的 List Format 的主机 CPU 编号（请参阅 lscpu）。此 ASCII 十进制列表可以包含数字，也可以包含数字范围。例如，</span><strong><span>关联</span></strong><span> 0-1,8-11（扩展的 0、1、8、9、10、11）将允许 VM 仅在这六个特定主机核心上运行。</span></p><h4 id='cpu-type-cpu类型'><span>CPU Type CPU类型</span></h4><p><span>QEMU can emulate a number different of </span><strong><span>CPU types</span></strong><span> from 486 to the latest Xeon processors. Each new processor generation adds new features, like hardware assisted 3d rendering, random number generation, memory protection, etc. Also, a current generation can be upgraded through microcode update with bug or security fixes.</span>
<span>QEMU 可以模拟从 486 到最新的 Xeon 处理器的许多不同 </span><strong><span>CPU 类型</span></strong><span>。每一代新处理器都会增加新功能，如硬件辅助 3D 渲染、随机数生成、内存保护等。此外，当前一代可以通过带有错误或安全修复的微码更新进行升级。</span></p><p><span>Usually you should select for your VM a processor type which closely matches the CPU of the host system, as it means that the host CPU features (also called </span><em><span>CPU flags</span></em><span> ) will be available in your VMs. If you want an exact match, you can set the CPU type to </span><strong><span>host</span></strong><span> in which case the VM will have exactly the same CPU flags as your host system.</span>
<span>通常，您应该为 VM 选择与主机系统的 CPU 非常匹配的处理器类型，因为这意味着主机 CPU 功能（也称为 </span><em><span>CPU 标志</span></em><span>）将在 VM 中可用。如果需要完全匹配，可以将 CPU 类型设置为</span><strong><span>主机</span></strong><span>，在这种情况下，VM 将具有与主机系统完全相同的 CPU 标志。</span></p><p><span>This has a downside though. If you want to do a live migration of VMs between different hosts, your VM might end up on a new system with a different CPU type or a different microcode version. If the CPU flags passed to the guest are missing, the QEMU process will stop. To remedy this QEMU has also its own virtual CPU types, that Proxmox VE uses by default.</span>
<span>不过，这有一个缺点。如果要在不同主机之间实时迁移 VM，则 VM 最终可能会位于具有不同 CPU 类型或不同微码版本的新系统上。如果缺少传递给客户机的 CPU 标志，则 QEMU 进程将停止。为了解决这个问题，QEMU 也有自己的虚拟 CPU 类型，Proxmox VE 默认使用。</span></p><p><span>The backend default is </span><em><span>kvm64</span></em><span> which works on essentially all x86_64 host CPUs and the UI default when creating a new VM is </span><em><span>x86-64-v2-AES</span></em><span>, which requires a host CPU starting from Westmere for Intel or at least a fourth generation Opteron for AMD.</span>
<span>后端默认值为 </span><em><span>kvm64</span></em><span>，它基本上适用于所有x86_64主机 CPU，创建新 VM 时的 UI 默认值为 </span><em><span>x86-64-v2-AES</span></em><span>，它需要从 Westmere 开始的主机 CPU 用于 Intel 或至少第四代 Opteron 用于 AMD。</span></p><p><span>In short: 总之：</span></p><p><span>If you don’t care about live migration or have a homogeneous cluster where all nodes have the same CPU and same microcode version, set the CPU type to host, as in theory this will give your guests maximum performance.</span>
<span>如果您不关心实时迁移，或者有一个同构集群，其中所有节点都具有相同的 CPU 和相同的微码版本，请将 CPU 类型设置为托管，因为从理论上讲，这将为您的来宾提供最大的性能。</span></p><p><span>If you care about live migration and security, and you have only Intel CPUs or only AMD CPUs, choose the lowest generation CPU model of your cluster.</span>
<span>如果您关心实时迁移和安全性，并且只有 Intel CPU 或 AMD CPU，请选择集群的最低代 CPU 型号。</span></p><p><span>If you care about live migration without security, or have mixed Intel/AMD cluster, choose the lowest compatible virtual QEMU CPU type.</span>
<span>如果您关心没有安全性的实时迁移，或者拥有混合的 Intel/AMD 集群，请选择兼容最低的虚拟 QEMU CPU 类型。</span></p><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9YHhAIJFCExAsKUkE8IAFFPIDUIqhBRSDRBUqC%0ACimFFBCBpCWx02IaZ3G2SdyxPZ7vHh6+mcnSZnFjKIge6Wj8zYzvPf9z/me5d8TM+F8WfbkNuFx5%0ABcDLLf/fAEZGRmx4eNh6enqsp6fHhoeHbWRk5D9aFeSlVqHNmzfb6H33sHnT7ZQmD5GfOMax6Sm+%0APl5h1Yc+xpYtW2SBbX1ReUkRGBkZsdH77mHLW95EOv4Ms3ueJh6YYPHUFF9aljJ63z3cf//9/5FI%0AvKQIDA8P293L2yhVjjH7t51ocDiviFecF46n7XzBreChhx4qNhH5t0XjJUVgx44ddGUZ9b/vIpQD%0AoRQIWSDJAiFL6B9axo4dO4gxAmANWVDLG+Ln82URMRGhVCqRHxonlAPqFXWKC4r6IhI6OMjMzBN4%0A/4LlTUQQEZxzZ32QJAlpmrb+p16vU6vVOHXq1AWjN18AnDj0F971vrs4OnmYJVkoDA4FCPUO172I%0ACgnt7SV++4vvsGhRJx3tJbIsRVVpsUnOBBABBVFECl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80Zmb33nsvX/z8XdSmj2AWOXhwkrxe46+79jB55Dh/3T2GxUhHextdXW2sXN7PNWtW%0AIQKDA71FFBoAjIgQkVg/a5+oHrU5zIznDhxk964xKpXKggAoTlWW8+OfPorlOQ//cjsDy1bS2dFO%0AW+diVly1iL6+Pqanpzl5qsL4pPHwN3/G1InDlMsZ7Z1tDA30cfWqIa5dexV9fb2YnT7UTxw4xsHJ%0Ao4yOjfOP8QOMjx/k4OQx7r777lY0zycXvJ02M4sxMjg4SL1eR0TYsGEDw8PD9PX10d7ejogUN3a1%0AGqpKCIE8z5mdnUVVqVarbN++nba2Nvbu3csDDzyAqrJ8+atb+zjn6e/vZ/Xq1axatYq1a9fS29tL%0AlmUMDQ1RKpXOm9EXvV6v1+tWr9eZnp5mZmaGWq1GjLHF62aiNZ+bnPfe45xrvTZzxMyYmZk56+LX%0AzKjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"></th><th><span>Live migrations between Intel and AMD host CPUs have no guarantee to work. Intel 和 AMD 主机 CPU 之间的实时迁移无法保证正常工作。</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><p><span>See also List of AMD and Intel CPU Types as Defined in QEMU.</span>
<span>另请参阅 QEMU 中定义的 AMD 和 Intel CPU 类型列表。</span></p><h4 id='qemu-cpu-types-qemu-cpu-类型'><span>QEMU CPU Types QEMU CPU 类型</span></h4><p><span>QEMU also provide virtual CPU types, compatible with both Intel and AMD host CPUs.</span>
<span>QEMU 还提供虚拟 CPU 类型，与 Intel 和 AMD 主机 CPU 兼容。</span></p><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWW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KjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"></th><th><span>To mitigate the Spectre vulnerability for virtual CPU types, you need to add the relevant CPU flags, see </span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_meltdown_spectre'><span>Meltdown / Spectre related CPU flags</span></a><span>. 要缓解虚拟 CPU 类型的 Spectre 漏洞，您需要添加相关的 CPU 标志，请参阅 </span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_meltdown_spectre'><span>Meltdown / Spectre 相关的 CPU 标志</span></a><span>。</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><p><span>Historically, Proxmox VE had the </span><em><span>kvm64</span></em><span> CPU model, with CPU flags at the level of Pentium 4 enabled, so performance was not great for certain workloads.</span>
<span>从历史上看，Proxmox VE 具有 </span><em><span>kvm64</span></em><span> CPU 模型，启用了 Pentium 4 级别的 CPU 标志，因此对于某些工作负载来说，性能不是很好。</span></p><p><span>In the summer of 2020, AMD, Intel, Red Hat, and SUSE collaborated to define three x86-64 microarchitecture levels on top of the x86-64 baseline, with modern flags enabled. For details, see the </span><a href='https://gitlab.com/x86-psABIs/x86-64-ABI'><span>x86-64-ABI specification</span></a><span>.</span>
<span>2020 年夏天，AMD、Intel、Red Hat 和 SUSE 合作，在 x86-64 基线之上定义了三个 x86-64 微架构级别，并启用了现代标志。具体操作请参见</span><a href='https://gitlab.com/x86-psABIs/x86-64-ABI'><span>x86-64-ABI规格</span></a><span>。</span></p><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeU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3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"></th><th><span>Some newer distributions like CentOS 9 are now built with </span><em><span>x86-64-v2</span></em><span> flags as a minimum requirement. 一些较新的发行版，如 CentOS 9，现在以 </span><em><span>x86-64-v2</span></em><span> 标志作为最低要求。</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><ul><li><p><em><span>kvm64 (x86-64-v1)</span></em><span>: Compatible with Intel CPU &gt;= Pentium 4, AMD CPU &gt;= Phenom.</span>
<em><span>kvm64 （x86-64-v1）：</span></em><span>兼容 Intel CPU &gt;= Pentium 4，AMD CPU &gt;= Phenom。</span></p></li><li><p><em><span>x86-64-v2</span></em><span>: Compatible with Intel CPU &gt;= Nehalem, AMD CPU &gt;= Opteron_G3. Added CPU flags compared to </span><em><span>x86-64-v1</span></em><span>: </span><em><span>+cx16</span></em><span>, </span><em><span>+lahf-lm</span></em><span>, </span><em><span>+popcnt</span></em><span>, </span><em><span>+pni</span></em><span>, </span><em><span>+sse4.1</span></em><span>, </span><em><span>+sse4.2</span></em><span>, </span><em><span>+ssse3</span></em><span>.</span>
<em><span>x86-64-v2</span></em><span>：兼容 Intel CPU &gt;= Nehalem，AMD CPU &gt;= Opteron_G3。与 </span><em><span>x86-64-v1</span></em><span> 相比，添加了 CPU 标志：+</span><em><span>cx16</span></em><span>、</span><em><span>+lahf-lm</span></em><span>、</span><em><span>+popcnt</span></em><span>、</span><em><span>+pni</span></em><span>、</span><em><span>+sse4.1</span></em><span>、</span><em><span>+sse4.2</span></em><span>、</span><em><span>+ssse3</span></em><span>。</span></p></li><li><p><em><span>x86-64-v2-AES</span></em><span>: Compatible with Intel CPU &gt;= Westmere, AMD CPU &gt;= Opteron_G4. Added CPU flags compared to </span><em><span>x86-64-v2</span></em><span>: </span><em><span>+aes</span></em><span>.</span>
<em><span>x86-64-v2-AES</span></em><span>：兼容 Intel CPU &gt;= Westmere、AMD CPU &gt;= Opteron_G4。与 </span><em><span>x86-64-v2</span></em><span> 相比，添加了 CPU 标志：+</span><em><span>aes</span></em><span>。</span></p></li><li><p><em><span>x86-64-v3</span></em><span>: Compatible with Intel CPU &gt;= Broadwell, AMD CPU &gt;= EPYC. Added CPU flags compared to </span><em><span>x86-64-v2-AES</span></em><span>: </span><em><span>+avx</span></em><span>, </span><em><span>+avx2</span></em><span>, </span><em><span>+bmi1</span></em><span>, </span><em><span>+bmi2</span></em><span>, </span><em><span>+f16c</span></em><span>, </span><em><span>+fma</span></em><span>, </span><em><span>+movbe</span></em><span>, </span><em><span>+xsave</span></em><span>.</span>
<em><span>x86-64-v3</span></em><span>：兼容 Intel CPU &gt;= Broadwell，AMD CPU &gt;= EPYC。与 </span><em><span>x86-64-v2-AES</span></em><span> 相比，添加了 CPU 标志：+</span><em><span>avx</span></em><span>、</span><em><span>+avx2</span></em><span>、</span><em><span>+bmi1</span></em><span>、</span><em><span>+bmi2</span></em><span>、</span><em><span>+f16c</span></em><span>、</span><em><span>+fma</span></em><span>、</span><em><span>+movbe</span></em><span>、</span><em><span>+xsave</span></em><span>。</span></p></li><li><p><em><span>x86-64-v4</span></em><span>: Compatible with Intel CPU &gt;= Skylake, AMD CPU &gt;= EPYC v4 Genoa. Added CPU flags compared to </span><em><span>x86-64-v3</span></em><span>: </span><em><span>+avx512f</span></em><span>, </span><em><span>+avx512bw</span></em><span>, </span><em><span>+avx512cd</span></em><span>, </span><em><span>+avx512dq</span></em><span>, </span><em><span>+avx512vl</span></em><span>.</span>
<em><span>x86-64-v4</span></em><span>：兼容 Intel CPU &gt;= Skylake，AMD CPU &gt;= EPYC v4 Genoa。与 </span><em><span>x86-64-v3</span></em><span> 相比，添加了 CPU 标志：+</span><em><span>avx512f</span></em><span>、</span><em><span>+avx512bw</span></em><span>、</span><em><span>+avx512cd</span></em><span>、</span><em><span>+avx512dq</span></em><span>、</span><em><span>+avx512vl</span></em><span>。</span></p></li></ul><h4 id='custom-cpu-types-自定义-cpu-类型'><span>Custom CPU Types 自定义 CPU 类型</span></h4><p><span>You can specify custom CPU types with a configurable set of features. These are maintained in the configuration file /etc/pve/virtual-guest/cpu-models.conf by an administrator. See man cpu-models.conf for format details.</span>
<span>您可以使用一组可配置的功能来指定自定义 CPU 类型。这些由管理员在配置文件 /etc/pve/virtual-guest/cpu-models.conf 中维护。有关格式详细信息，请参见 man cpu-models.conf。</span></p><p><span>Specified custom types can be selected by any user with the Sys.Audit privilege on /nodes. When configuring a custom CPU type for a VM via the CLI or API, the name needs to be prefixed with </span><em><span>custom-</span></em><span>.</span>
<span>对 /nodes 具有 Sys.Audit 权限的任何用户都可以选择指定的自定义类型。通过 CLI 或 API 为 VM 配置自定义 CPU 类型时，名称需要以 </span><em><span>custom-</span></em><span> 为前缀。</span></p><h4 id='meltdown--spectre-related-cpu-flags-meltdown--spectre-相关的-cpu-标志'><span>Meltdown / Spectre related CPU flags Meltdown / Spectre 相关的 CPU 标志</span></h4><p><span>There are several CPU flags related to the Meltdown and Spectre vulnerabilities [</span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnote_4'><span>4</span></a><span>] which need to be set manually unless the selected CPU type of your VM already enables them by default.</span>
<span>有几个与 Meltdown 和 Spectre 漏洞4]，除非您的虚拟机的选定 CPU 类型已默认启用它们，否则需要手动设置它们。</span></p><p><span>There are two requirements that need to be fulfilled in order to use these CPU flags:</span>
<span>要使用这些 CPU 标志，需要满足两个要求：</span></p><ul><li><p><span>The host CPU(s) must support the feature and propagate it to the guest’s virtual CPU(s)</span>
<span>主机 CPU 必须支持该功能并将其传播到客户机的虚拟 CPU</span></p></li><li><p><span>The guest operating system must be updated to a version which mitigates the attacks and is able to utilize the CPU feature</span>
<span>客户机操作系统必须更新到能够缓解攻击并能够利用 CPU 功能的版本</span></p></li></ul><p><span>Otherwise you need to set the desired CPU flag of the virtual CPU, either by editing the CPU options in the web UI, or by setting the </span><em><span>flags</span></em><span> property of the </span><em><span>cpu</span></em><span> option in the VM configuration file.</span>
<span>否则，您需要通过在 Web UI 中编辑 CPU 选项或在 VM 配置文件中设置 </span><em><span>cpu</span></em><span> 选项的 </span><em><span>flags</span></em><span> 属性来设置虚拟 CPU 所需的 CPU 标志。</span></p><p><span>For Spectre v1,v2,v4 fixes, your CPU or system vendor also needs to provide a so-called “microcode update” for your CPU, see chapter Firmware Updates. Note that not all affected CPUs can be updated to support spec-ctrl.</span>
<span>对于 Spectre v1、v2、v4 修复，您的 CPU 或系统供应商还需要为您的 CPU 提供所谓的“微码更新”，请参阅固件更新一章。请注意，并非所有受影响的 CPU 都可以更新以支持 spec-ctrl。</span></p><p><span>To check if the Proxmox VE host is vulnerable, execute the following command as root:</span>
<span>要检查 Proxmox VE 主机是否易受攻击，请以 root 身份执行以下命令：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">for f in /sys/devices/system/cpu/vulnerabilities/*; do echo "${f##*/} -" $(cat "$f"); done</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 52px;"></div><div class="CodeMirror-gutters" style="display: none; height: 52px;"></div></div></div></pre><p><span>A community script is also available to detect if the host is still vulnerable. [</span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnote_5'><span>5</span></a><span>]</span>
<span>社区脚本也可用于检测主机是否仍然容易受到攻击。5]</span></p><h4 id='intel-processors-intel-处理器'><span>Intel processors Intel 处理器</span></h4><ul><li><p><em><span>pcid PCID的</span></em></p><p><span>This reduces the performance impact of the Meltdown (CVE-2017-5754) mitigation called </span><em><span>Kernel Page-Table Isolation (KPTI)</span></em><span>, which effectively hides the Kernel memory from the user space. Without PCID, KPTI is quite an expensive mechanism [</span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnote_6'><span>6</span></a><span>].</span>
<span>这减少了称为</span><em><span>内核页表隔离 （KPTI）</span></em><span> 的 Meltdown （CVE-2017-5754） 缓解措施对性能的影响，该缓解措施有效地从用户空间中隐藏了内核内存。如果没有PCID，KPTI是一种相当昂贵的机制 6]。</span></p><p><span>To check if the Proxmox VE host supports PCID, execute the following command as root:</span>
<span>要检查Proxmox VE主机是否支持PCID，请以root身份执行以下命令：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># grep ' pcid ' /proc/cpuinfo</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>If this does not return empty your host’s CPU has support for </span><em><span>pcid</span></em><span>.</span>
<span>如果这不返回空，则主机的 CPU 支持 </span><em><span>pcid</span></em><span>。</span></p></li><li><p><em><span>spec-ctrl</span></em></p><p><span>Required to enable the Spectre v1 (CVE-2017-5753) and Spectre v2 (CVE-2017-5715) fix, in cases where retpolines are not sufficient. Included by default in Intel CPU models with -IBRS suffix. Must be explicitly turned on for Intel CPU models without -IBRS suffix. Requires an updated host CPU microcode (intel-microcode &gt;= 20180425).</span>
<span>在 retpolines 不足的情况下，需要启用 Spectre v1 （CVE-2017-5753） 和 Spectre v2 （CVE-2017-5715） 修复。默认情况下包含在带有 -IBRS 后缀的 Intel CPU 型号中。对于不带 -IBRS 后缀的 Intel CPU 型号，必须显式启用。需要更新的主机 CPU 微码 （intel-microcode &gt;= 20180425）。</span></p></li><li><p><em><span>ssbd SSBD公司</span></em></p><p><span>Required to enable the Spectre V4 (CVE-2018-3639) fix. Not included by default in any Intel CPU model. Must be explicitly turned on for all Intel CPU models. Requires an updated host CPU microcode(intel-microcode &gt;= 20180703).</span>
<span>需要启用 Spectre V4 （CVE-2018-3639） 修复。默认情况下不包含在任何 Intel CPU 型号中。必须为所有 Intel CPU 型号明确启用。需要更新的主机 CPU 微码 （intel-microcode &gt;= 20180703）。</span></p></li></ul><h4 id='amd-processors-amd-处理器'><span>AMD processors AMD 处理器</span></h4><ul><li><p><em><span>ibpb IBPB的</span></em></p><p><span>Required to enable the Spectre v1 (CVE-2017-5753) and Spectre v2 (CVE-2017-5715) fix, in cases where retpolines are not sufficient. Included by default in AMD CPU models with -IBPB suffix. Must be explicitly turned on for AMD CPU models without -IBPB suffix. Requires the host CPU microcode to support this feature before it can be used for guest CPUs.</span>
<span>在 retpolines 不足的情况下，需要启用 Spectre v1 （CVE-2017-5753） 和 Spectre v2 （CVE-2017-5715） 修复。默认情况下，包含在带有 -IBPB 后缀的 AMD CPU 型号中。对于不带 -IBPB 后缀的 AMD CPU 型号，必须显式启用。需要主机 CPU 微码支持此功能，然后才能用于客户机 CPU。</span></p></li><li><p><em><span>virt-ssbd</span></em></p><p><span>Required to enable the Spectre v4 (CVE-2018-3639) fix. Not included by default in any AMD CPU model. Must be explicitly turned on for all AMD CPU models. This should be provided to guests, even if amd-ssbd is also provided, for maximum guest compatibility. Note that this must be explicitly enabled when when using the &quot;host&quot; cpu model, because this is a virtual feature which does not exist in the physical CPUs.</span>
<span>启用 Spectre v4 （CVE-2018-3639） 修复程序所必需。默认情况下，不包含在任何 AMD CPU 型号中。必须为所有 AMD CPU 型号明确启用。即使也提供了 amd-ssbd，也应向客户机提供此功能，以实现最大的客户兼容性。请注意，在使用“主机”CPU 模型时，必须显式启用此功能，因为这是物理 CPU 中不存在的虚拟功能。</span></p></li><li><p><em><span>amd-ssbd AMD-SSBD的</span></em></p><p><span>Required to enable the Spectre v4 (CVE-2018-3639) fix. Not included by default in any AMD CPU model. Must be explicitly turned on for all AMD CPU models. This provides higher performance than virt-ssbd, therefore a host supporting this should always expose this to guests if possible. virt-ssbd should none the less also be exposed for maximum guest compatibility as some kernels only know about virt-ssbd.</span>
<span>启用 Spectre v4 （CVE-2018-3639） 修复程序所必需。默认情况下，不包含在任何 AMD CPU 型号中。必须为所有 AMD CPU 型号明确启用。这提供了比 virt-ssbd 更高的性能，因此，如果可能，支持此功能的主机应始终向客户公开此内容。virt-ssbd 也应该暴露出来，以获得最大的客户机兼容性，因为一些内核只知道 virt-ssbd。</span></p></li><li><p><em><span>amd-no-ssb AMD无SSB</span></em></p><p><span>Recommended to indicate the host is not vulnerable to Spectre V4 (CVE-2018-3639). Not included by default in any AMD CPU model. Future hardware generations of CPU will not be vulnerable to CVE-2018-3639, and thus the guest should be told not to enable its mitigations, by exposing amd-no-ssb. This is mutually exclusive with virt-ssbd and amd-ssbd.</span>
<span>建议指示主机不容易受到 Spectre V4 （CVE-2018-3639） 的攻击。默认情况下，不包含在任何 AMD CPU 型号中。未来几代硬件 CPU 将不容易受到 CVE-2018-3639 的攻击，因此应通过暴露 amd-no-ssb 来告诉客户不要启用其缓解措施。这与 virt-ssbd 和 amd-ssbd 是互斥的。</span></p></li></ul><h4 id='numa-努玛'><span>NUMA 努玛</span></h4><p><span>You can also optionally emulate a </span><strong><span>NUMA</span></strong><span> [</span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnote_7'><span>7</span></a><span>] architecture in your VMs. The basics of the NUMA architecture mean that instead of having a global memory pool available to all your cores, the memory is spread into local banks close to each socket. This can bring speed improvements as the memory bus is not a bottleneck anymore. If your system has a NUMA architecture [</span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnote_8'><span>8</span></a><span>] we recommend to activate the option, as this will allow proper distribution of the VM resources on the host system. This option is also required to hot-plug cores or RAM in a VM.</span>
<span>您还可以选择性地在虚拟机中模拟 </span><strong><span>NUMA</span></strong><span> 7] 体系结构。NUMA 体系结构的基础知识意味着，内存不是为所有内核提供全局内存池，而是分布到靠近每个插槽的本地存储区。这可以带来速度的提高，因为内存总线不再是瓶颈。如果您的系统具有 NUMA 体系结构 8] 我们建议激活该选项，因为这将允许在主机系统上正确分配 VM 资源。在 VM 中热插拔核心或 RAM 时，也需要此选项。</span></p><p><span>If the NUMA option is used, it is recommended to set the number of sockets to the number of nodes of the host system.</span>
<span>如果使用 NUMA 选项，建议将套接字数设置为主机系统的节点数。</span></p><h4 id='vcpu-hot-plug-vcpu热插拔'><span>vCPU hot-plug vCPU热插拔</span></h4><p><span>Modern operating systems introduced the capability to hot-plug and, to a certain extent, hot-unplug CPUs in a running system. Virtualization allows us to avoid a lot of the (physical) problems real hardware can cause in such scenarios. Still, this is a rather new and complicated feature, so its use should be restricted to cases where its absolutely needed. Most of the functionality can be replicated with other, well tested and less complicated, features, see </span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_cpu_resource_limits'><span>Resource Limits</span></a><span>.</span>
<span>现代操作系统引入了在正在运行的系统中热插拔 CPU 的功能，并在一定程度上引入了热插拔 CPU 的功能。虚拟化使我们能够避免在这种情况下实际硬件可能导致的许多（物理）问题。尽管如此，这是一个相当新颖和复杂的功能，因此应将其使用限制在绝对需要的情况下。大多数功能都可以与其他经过良好测试且不太复杂的功能一起复制，请参阅</span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_cpu_resource_limits'><span>资源限制</span></a><span>。</span></p><p><span>In Proxmox VE the maximal number of plugged CPUs is always cores * sockets. To start a VM with less than this total core count of CPUs you may use the </span><strong><span>vcpus</span></strong><span> setting, it denotes how many vCPUs should be plugged in at VM start.</span>
<span>在 Proxmox VE 中，插入的 CPU 的最大数量始终是核心 * 插槽。要启动少于此 CPU 核心总数的 VM，您可以使用 </span><strong><span>vcpus</span></strong><span> 设置，它表示在 VM 启动时应插入多少 vCPU。</span></p><p><span>Currently only this feature is only supported on Linux, a kernel newer than 3.10 is needed, a kernel newer than 4.7 is recommended.</span>
<span>目前仅 Linux 支持此功能，需要 3.10 以上的内核，推荐使用 4.7 以上的内核。</span></p><p><span>You can use a udev rule as follow to automatically set new CPUs as online in the guest:</span>
<span>您可以按照以下方式使用 udev 规则在客户机中自动将新 CPU 设置为联机：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">SUBSYSTEM=="cpu", ACTION=="add", TEST=="online", ATTR{online}=="0", ATTR{online}="1"</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 52px;"></div><div class="CodeMirror-gutters" style="display: none; height: 52px;"></div></div></div></pre><p><span>Save this under /etc/udev/rules.d/ as a file ending in .rules.</span>
<span>将其保存在 /etc/udev/rules.d/ 下，作为以 .rules 结尾的文件。</span></p><p><span>Note: CPU hot-remove is machine dependent and requires guest cooperation. The deletion command does not guarantee CPU removal to actually happen, typically it’s a request forwarded to guest OS using target dependent mechanism, such as ACPI on x86/amd64.</span>
<span>注意：CPU 热移除取决于计算机，需要客户配合。deletion 命令并不能保证 CPU 删除实际发生，通常是使用目标依赖机制（例如 x86/amd64 上的 ACPI）转发到客户机操作系统的请求。</span></p><h3 id='memory-记忆'><span>Memory 记忆 </span></h3><p><span>For each VM you have the option to set a fixed size memory or asking Proxmox VE to dynamically allocate memory based on the current RAM usage of the host.</span>
<span>对于每个VM，您可以选择设置固定大小的内存，或要求Proxmox VE根据主机的当前RAM使用情况动态分配内存。</span></p><p><a href='https://pve.proxmox.com/pve-docs/images/screenshot/gui-create-vm-memory.png'><img src="https://pve.proxmox.com/pve-docs/images/screenshot/gui-create-vm-memory.png" referrerpolicy="no-referrer" alt="screenshot/gui-create-vm-memory.png"></a></p><p><span>Fixed Memory Allocation 固定内存分配</span></p><p><span>When setting memory and minimum memory to the same amount Proxmox VE will simply allocate what you specify to your VM.</span>
<span>当将内存和最小内存设置为相同的量时，Proxmox VE将简单地将您指定的内容分配给您的VM。</span></p><p><span>Even when using a fixed memory size, the ballooning device gets added to the VM, because it delivers useful information such as how much memory the guest really uses. In general, you should leave </span><strong><span>ballooning</span></strong><span> enabled, but if you want to disable it (like for debugging purposes), simply uncheck </span><strong><span>Ballooning Device</span></strong><span> or set</span>
<span>即使使用固定的内存大小，气球设备也会添加到 VM 中，因为它会提供有用的信息，例如客户机实际使用的内存量。一般来说，您应该保持</span><strong><span>气球功能</span></strong><span>处于启用状态，但如果您想禁用它（例如出于调试目的），只需取消选中</span><strong><span>气球设备</span></strong><span>或设置</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">balloon: 0</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>in the configuration. 在配置中。</span></p><p><span>Automatic Memory Allocation</span>
<span>自动内存分配</span></p><p><span>When setting the minimum memory lower than memory, Proxmox VE will make sure that the minimum amount you specified is always available to the VM, and if RAM usage on the host is below 80%, will dynamically add memory to the guest up to the maximum memory specified.</span>
<span>当将最小内存设置为低于内存时，Proxmox VE 将确保您指定的最小内存量始终可供 VM 使用，如果主机上的 RAM 使用率低于 80%，将动态地向客户机添加内存，直至达到指定的最大内存。</span></p><p><span>When the host is running low on RAM, the VM will then release some memory back to the host, swapping running processes if needed and starting the oom killer in last resort. The passing around of memory between host and guest is done via a special balloon kernel driver running inside the guest, which will grab or release memory pages from the host. [</span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnote_9'><span>9</span></a><span>]</span>
<span>当主机的 RAM 不足时，VM 将释放一些内存回主机，如果需要，交换正在运行的进程，并在万不得已的情况下启动 oom killer。主机和客户机之间的内存传递是通过在客户机内部运行的特殊气球内核驱动程序完成的，该驱动程序将从主机获取或释放内存页。9]</span></p><p><span>When multiple VMs use the autoallocate facility, it is possible to set a </span><strong><span>Shares</span></strong><span> coefficient which indicates the relative amount of the free host memory that each VM should take. Suppose for instance you have four VMs, three of them running an HTTP server and the last one is a database server. To cache more database blocks in the database server RAM, you would like to prioritize the database VM when spare RAM is available. For this you assign a Shares property of 3000 to the database VM, leaving the other VMs to the Shares default setting of 1000. The host server has 32GB of RAM, and is currently using 16GB, leaving 32 * 80/100 - 16 = 9GB RAM to be allocated to the VMs on top of their configured minimum memory amount. The database VM will benefit from 9 * 3000 / (3000 + 1000 + 1000 + 1000) = 4.5 GB extra RAM and each HTTP server from 1.5 GB.</span>
<span>当多个 VM 使用自动分配工具时，可以设置</span><strong><span>份额</span></strong><span>系数，该系数指示每个 VM 应占用的可用主机内存的相对量。例如，假设您有四个 VM，其中三个运行 HTTP 服务器，最后一个是数据库服务器。要在数据库服务器 RAM 中缓存更多数据库块，您希望在备用 RAM 可用时确定数据库 VM 的优先级。为此，您需要为数据库 VM 分配 Shares 属性 3000，而将其他 VM 保留为 Shares 默认设置 1000。主机服务器具有 32GB 的 RAM，当前使用 16GB，剩余 32 * 80/100 - 16 = 9GB RAM 将分配给 VM 的配置最小内存量。数据库 VM 将受益于 9 * 3000 / （3000 + 1000 + 1000） = 4.5 GB 的额外 RAM，每个 HTTP 服务器将受益于 1.5 GB。</span></p><p><span>All Linux distributions released after 2010 have the balloon kernel driver included. For Windows OSes, the balloon driver needs to be added manually and can incur a slowdown of the guest, so we don’t recommend using it on critical systems.</span>
<span>2010 年之后发布的所有 Linux 发行版都包含气球内核驱动程序。对于 Windows 操作系统，气球驱动程序需要手动添加，并且可能会导致客户机速度变慢，因此我们不建议在关键系统上使用它。</span></p><p><span>When allocating RAM to your VMs, a good rule of thumb is always to leave 1GB of RAM available to the host.</span>
<span>为 VM 分配 RAM 时，一个好的经验法则是始终为主机留出 1GB 的可用 RAM。</span></p><h3 id='network-device-网络设备'><span>Network Device 网络设备 </span></h3><p><a href='https://pve.proxmox.com/pve-docs/images/screenshot/gui-create-vm-network.png'><img src="https://pve.proxmox.com/pve-docs/images/screenshot/gui-create-vm-network.png" referrerpolicy="no-referrer" alt="screenshot/gui-create-vm-network.png"></a></p><p><span>Each VM can have many </span><em><span>Network interface controllers</span></em><span> (NIC), of four different types:</span>
<span>每个 VM 可以有多种</span><em><span>网络接口控制器</span></em><span> （NIC），分为四种不同类型的：</span></p><ul><li><p><strong><span>Intel E1000</span></strong><span> is the default, and emulates an Intel Gigabit network card.</span>
<strong><span>Intel E1000</span></strong><span> 是默认设置，并模拟 Intel 千兆位网卡。</span></p></li><li><p><span>the </span><strong><span>VirtIO</span></strong><span> paravirtualized NIC should be used if you aim for maximum performance. Like all VirtIO devices, the guest OS should have the proper driver installed.</span>
<span>如果您的目标是获得最高性能，则应使用 </span><strong><span>VirtIO</span></strong><span> 半虚拟化 NIC。与所有 VirtIO 设备一样，客户操作系统应安装正确的驱动程序。</span></p></li><li><p><span>the </span><strong><span>Realtek 8139</span></strong><span> emulates an older 100 MB/s network card, and should only be used when emulating older operating systems ( released before 2002 )</span>
<strong><span>Realtek 8139</span></strong><span> 模拟较旧的 100 MB/s 网卡，只能在模拟较旧的操作系统（2002 年之前发布）时使用。</span></p></li><li><p><span>the </span><strong><span>vmxnet3</span></strong><span> is another paravirtualized device, which should only be used when importing a VM from another hypervisor.</span>
<strong><span>vmxnet3</span></strong><span> 是另一个半虚拟化设备，仅在从另一个虚拟机管理程序导入 VM 时才应使用。</span></p></li></ul><p><span>Proxmox VE will generate for each NIC a random </span><strong><span>MAC address</span></strong><span>, so that your VM is addressable on Ethernet networks.</span>
<span>Proxmox VE 将为每个 NIC 生成一个随机 </span><strong><span>MAC 地址</span></strong><span>，以便您的 VM 可以在以太网网络上寻址。</span></p><p><span>The NIC you added to the VM can follow one of two different models:</span>
<span>添加到 VM 的 NIC 可以遵循以下两种不同模型之一：</span></p><ul><li><p><span>in the default </span><strong><span>Bridged mode</span></strong><span> each virtual NIC is backed on the host by a </span><em><span>tap device</span></em><span>, ( a software loopback device simulating an Ethernet NIC ). This tap device is added to a bridge, by default vmbr0 in Proxmox VE. In this mode, VMs have direct access to the Ethernet LAN on which the host is located.</span>
<span>在默认</span><strong><span>的桥接模式下</span></strong><span>，每个虚拟 NIC 都由</span><em><span>一个分流设备</span></em><span>（模拟以太网 NIC 的软件环回设备）在主机上提供支持。此分流器设备被添加到桥接器中，默认情况下在 Proxmox VE 中为 vmbr0。在此模式下，虚拟机可以直接访问主机所在的以太网 LAN。</span></p></li><li><p><span>in the alternative </span><strong><span>NAT mode</span></strong><span>, each virtual NIC will only communicate with the QEMU user networking stack, where a built-in router and DHCP server can provide network access. This built-in DHCP will serve addresses in the private 10.0.2.0/24 range. The NAT mode is much slower than the bridged mode, and should only be used for testing. This mode is only available via CLI or the API, but not via the web UI.</span>
<span>在备用 </span><strong><span>NAT 模式下</span></strong><span>，每个虚拟 NIC 将仅与 QEMU 用户网络堆栈通信，其中内置路由器和 DHCP 服务器可以提供网络访问。此内置 DHCP 将提供私有 10.0.2.0/24 范围内的地址。NAT 模式比桥接模式慢得多，只能用于测试。此模式只能通过 CLI 或 API 使用，但不能通过 Web UI 使用。</span></p></li></ul><p><span>You can also skip adding a network device when creating a VM by selecting </span><strong><span>No network device</span></strong><span>.</span>
<span>还可以在创建 VM 时通过选择</span><strong><span>“无网络设备</span></strong><span>”来跳过添加网络设备。</span></p><p><span>You can overwrite the </span><strong><span>MTU</span></strong><span> setting for each VM network device. The option mtu=1 represents a special case, in which the MTU value will be inherited from the underlying bridge. This option is only available for </span><strong><span>VirtIO</span></strong><span> network devices.</span>
<span>您可以覆盖每个 VM 网络设备的 </span><strong><span>MTU</span></strong><span> 设置。选项 mtu=1 表示一种特殊情况，其中 MTU 值将从底层桥继承。此选项仅适用于 </span><strong><span>VirtIO</span></strong><span> 网络设备。</span></p><p><span>Multiqueue 多队列</span></p><p><span>If you are using the VirtIO driver, you can optionally activate the </span><strong><span>Multiqueue</span></strong><span> option. This option allows the guest OS to process networking packets using multiple virtual CPUs, providing an increase in the total number of packets transferred.</span>
<span>如果您使用的是 VirtIO 驱动程序，您可以选择激活多</span><strong><span>队列</span></strong><span>选项。此选项允许客户机操作系统使用多个虚拟 CPU 处理网络数据包，从而增加传输的数据包总数。</span></p><p><span>When using the VirtIO driver with Proxmox VE, each NIC network queue is passed to the host kernel, where the queue will be processed by a kernel thread spawned by the vhost driver. With this option activated, it is possible to pass </span><em><span>multiple</span></em><span> network queues to the host kernel for each NIC.</span>
<span>将 VirtIO 驱动程序与 Proxmox VE 一起使用时，每个 NIC 网络队列都会传递到主机内核，在那里队列将由 vhost 驱动程序生成的内核线程进行处理。激活此选项后，可以将</span><em><span>多个</span></em><span>网络队列传递给每个 NIC 的主机内核。</span></p><p><span>When using Multiqueue, it is recommended to set it to a value equal to the number of vCPUs of your guest. Remember that the number of vCPUs is the number of sockets times the number of cores configured for the VM. You also need to set the number of multi-purpose channels on each VirtIO NIC in the VM with this ethtool command:</span>
<span>使用 Multiqueue 时，建议将其设置为等于客户机的 vCPU 数量的值。请记住，vCPU 的数量是插槽数乘以为 VM 配置的核心数。您还需要使用以下 ethtool 命令在 VM 中的每个 VirtIO NIC 上设置多用途通道的数量：</span></p><p><span>ethtool -L ens1 combined X</span>
<span>ethtool -L ens1 组合 X</span></p><p><span>where X is the number of the number of vCPUs of the VM.</span>
<span>其中 X 是 VM 的 vCPU 数量。</span></p><p><span>To configure a Windows guest for Multiqueue install the </span><a href='https://pve.proxmox.com/wiki/Windows_VirtIO_Drivers'><span>Redhat VirtIO Ethernet Adapter drivers</span></a><span>, then adapt the NIC’s configuration as follows. Open the device manager, right click the NIC under &quot;Network adapters&quot;, and select &quot;Properties&quot;. Then open the &quot;Advanced&quot; tab and select &quot;Receive Side Scaling&quot; from the list on the left. Make sure it is set to &quot;Enabled&quot;. Next, navigate to &quot;Maximum number of RSS Queues&quot; in the list and set it to the number of vCPUs of your VM. Once you verified that the settings are correct, click &quot;OK&quot; to confirm them.</span>
<span>要为 Windows 客户机配置 Multiqueue，请安装 </span><a href='https://pve.proxmox.com/wiki/Windows_VirtIO_Drivers'><span>Redhat VirtIO 以太网适配器驱动程序</span></a><span>，然后按如下方式调整 NIC 的配置。打开设备管理器，右键单击“网络适配器”下的 NIC，然后选择“属性”。然后打开“高级”选项卡，并从左侧列表中选择“接收侧缩放”。确保它设置为“已启用”。接下来，导航到列表中的“RSS 队列的最大数量”，并将其设置为 VM 的 vCPU 数量。确认设置正确后，单击“确定”进行确认。</span></p><p><span>You should note that setting the Multiqueue parameter to a value greater than one will increase the CPU load on the host and guest systems as the traffic increases. We recommend to set this option only when the VM has to process a great number of incoming connections, such as when the VM is running as a router, reverse proxy or a busy HTTP server doing long polling.</span>
<span>您应该注意，将 Multiqueue 参数设置为大于 1 的值将随着流量的增加而增加主机和客户机系统上的 CPU 负载。建议仅在 VM 必须处理大量传入连接时设置此选项，例如，当 VM 作为路由器、反向代理或执行长时间轮询的繁忙 HTTP 服务器运行时。</span></p><h3 id='display-显示'><span>Display 显示 </span></h3><p><span>QEMU can virtualize a few types of VGA hardware. Some examples are:</span>
<span>QEMU 可以虚拟化几种类型的 VGA 硬件。一些例子是：</span></p><ul><li><p><strong><span>std</span></strong><span>, the default, emulates a card with Bochs VBE extensions.</span>
<strong><span>std</span></strong><span> 是默认值，模拟带有 Bochs VBE 扩展的卡。</span></p></li><li><p><strong><span>cirrus</span></strong><span>, this was once the default, it emulates a very old hardware module with all its problems. This display type should only be used if really necessary [</span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnote_10'><span>10</span></a><span>], for example, if using Windows XP or earlier</span>
<strong><span>Cirrus</span></strong><span>，这曾经是默认设置，它模拟了一个非常旧的硬件模块及其所有问题。只有在真正必要10]，例如，如果使用 Windows XP 或更早版本</span></p></li><li><p><strong><span>vmware</span></strong><span>, is a VMWare SVGA-II compatible adapter.</span>
<strong><span>vmware</span></strong><span> 是 VMWare SVGA-II 兼容适配器。</span></p></li><li><p><strong><span>qxl</span></strong><span>, is the QXL paravirtualized graphics card. Selecting this also enables </span><a href='https://www.spice-space.org/'><span>SPICE</span></a><span> (a remote viewer protocol) for the VM.</span>
<strong><span>qxl</span></strong><span>，是 QXL 半虚拟化显卡。选择此选项还会为 VM 启用 </span><a href='https://www.spice-space.org/'><span>SPICE</span></a><span>（远程查看器协议）。</span></p></li><li><p><strong><span>virtio-gl</span></strong><span>, often named VirGL is a virtual 3D GPU for use inside VMs that can offload workloads to the host GPU without requiring special (expensive) models and drivers and neither binding the host GPU completely, allowing reuse between multiple guests and or the host.</span>
<strong><span>virtio-gl</span></strong><span>，通常称为 VirGL，是一种用于虚拟机内部的虚拟 3D GPU，可以将工作负载卸载到主机 GPU，而无需特殊（昂贵的）模型和驱动程序，也无需完全绑定主机 GPU，允许在多个客户机和/或主机之间重复使用。</span></p><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9YHhAIJFCExAsKUkE8IAFFPIDUIqhBRSDRBUqC%0ACimFFBCBpCWx02IaZ3G2SdyxPZ7vHh6+mcnSZnFjKIge6Wj8zYzvPf9z/me5d8TM+F8WfbkNuFx5%0ABcDLLf/fAEZGRmx4eNh6enqsp6fHhoeHbWRk5D9aFeSlVqHNmzfb6H33sHnT7ZQmD5GfOMax6Sm+%0APl5h1Yc+xpYtW2SBbX1ReUkRGBkZsdH77mHLW95EOv4Ms3ueJh6YYPHUFF9aljJ63z3cf//9/5FI%0AvKQIDA8P293L2yhVjjH7t51ocDiviFecF46n7XzBreChhx4qNhH5t0XjJUVgx44ddGUZ9b/vIpQD%0AoRQIW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5WRrzg00viuKWWxpQUOH%0ANAZFQRpD48Xlkig0MTHBB95zG+VSylz1KCbWyDOh2XyK+56IqjWMKigkUnzWnPPFFFRRLZ29SQRU%0AELOGY4pZ6LKOlM07mZ07d/KOtw1TcB4sGkTDiDQ9K1IkrKeYmQC08d7pZLSiRBpE5s7aS0XAHFEK%0AAGY51Wr18g80Zmb33nsvX/z8XdSmj2AWOXhwkrxe46+79jB55Dh/3T2GxUhHextdXW2sXN7PNWtW%0AIQKDA71FFBoAjIgQkVg/a5+oHrU5zIznDhxk964xKpXKggAoTlWW8+OfPorlOQ//cjsDy1bS2dFO%0AW+diVly1iL6+Pqanpzl5qsL4pPHwN3/G1InDlMsZ7Z1tDA30cfWqIa5dexV9fb2YnT7UTxw4xsHJ%0Ao4yOjfOP8QOMjx/k4OQx7r777lY0zycXvJ02M4sxMjg4SL1eR0TYsGEDw8PD9PX10d7ejogUN3a1%0AGqpKCIE8z5mdnUVVqVarbN++nba2Nvbu3csDDzyAqrJ8+atb+zjn6e/vZ/Xq1axatYq1a9fS29tL%0AlmUMDQ1RKpXOm9EXvV6v1+tWr9eZnp5mZmaGWq1GjLHF62aiNZ+bnPfe45xrvTZzxMyYmZk56+LX%0AzKjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"></th><th><span>VirGL support needs some extra libraries that aren’t installed by default due to being relatively big and also not available as open source for all GPU models/vendors. For most setups you’ll just need to do: apt install libgl1 libegl1 VirGL 支持需要一些额外的库，这些库由于相对较大而默认未安装，并且也不是所有 GPU 型号/供应商都可以作为开源使用。对于大多数设置，您只需要执行以下操作： apt install libgl1 libegl1</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure></li></ul><p><span>You can edit the amount of memory given to the virtual GPU, by setting the </span><em><span>memory</span></em><span> option. This can enable higher resolutions inside the VM, especially with SPICE/QXL.</span>
<span>您可以通过设置</span><em><span>内存</span></em><span>选项来编辑分配给虚拟 GPU 的内存量。这可以在 VM 内部启用更高分辨率，尤其是使用 SPICE/QXL。</span></p><p><span>As the memory is reserved by display device, selecting Multi-Monitor mode for SPICE (such as qxl2 for dual monitors) has some implications:</span>
<span>由于内存是由显示设备预留的，因此为 SPICE 选择多显示器模式（例如双显示器的 qxl2）会产生一些影响：</span></p><ul><li><p><span>Windows needs a device for each monitor, so if your </span><em><span>ostype</span></em><span> is some version of Windows, Proxmox VE gives the VM an extra device per monitor. Each device gets the specified amount of memory.</span>
<span>Windows 需要每个显示器都有一个设备，因此，如果您的 </span><em><span>ostype</span></em><span> 是 Windows 的某个版本，Proxmox VE 会为每个显示器为 VM 提供额外的设备。每个设备都获得指定的内存量。</span></p></li><li><p><span>Linux VMs, can always enable more virtual monitors, but selecting a Multi-Monitor mode multiplies the memory given to the device with the number of monitors.</span>
<span>Linux VM 始终可以启用更多虚拟监视器，但选择多监视器模式会将提供给设备的内存乘以监视器的数量。</span></p></li></ul><p><span>Selecting serialX as display </span><em><span>type</span></em><span> disables the VGA output, and redirects the Web Console to the selected serial port. A configured display </span><em><span>memory</span></em><span> setting will be ignored in that case.</span>
<span>选择 serialX 作为显示</span><em><span>类型</span></em><span>将禁用 VGA 输出，并将 Web 控制台重定向到选定的串行端口。在这种情况下，配置的显示</span><em><span>内存</span></em><span>设置将被忽略。</span></p><p><span>VNC clipboard VNC 剪贴板</span></p><p><span>You can enable the VNC clipboard by setting clipboard to vnc.</span>
<span>您可以通过将剪贴板设置为 vnc 来启用 VNC 剪贴板。</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm set &lt;vmid&gt; -vga &lt;displaytype&gt;,clipboard=vnc</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>In order to use the clipboard feature, you must first install the SPICE guest tools. On Debian-based distributions, this can be achieved by installing spice-vdagent. For other Operating Systems search for it in the offical repositories or see: </span><a href='https://www.spice-space.org/download.html' target='_blank' class='url'>https://www.spice-space.org/download.html</a>
<span>要使用剪贴板功能，必须首先安装 SPICE 客户机工具。在基于 Debian 的发行版上，这可以通过安装 spice-vdagent 来实现。对于其他操作系统，请在官方存储库中搜索它或查看： </span><a href='https://www.spice-space.org/download.html' target='_blank' class='url'>https://www.spice-space.org/download.html</a></p><p><span>Once you have installed the spice guest tools, you can use the VNC clipboard function (e.g. in the noVNC console panel). However, if you’re using SPICE, virtio or virgl, you’ll need to choose which clipboard to use. This is because the default </span><strong><span>SPICE</span></strong><span> clipboard will be replaced by the </span><strong><span>VNC</span></strong><span> clipboard, if clipboard is set to vnc.</span>
<span>一旦你安装了spice guest工具，你就可以使用VNC剪贴板功能（例如，在noVNC控制台面板中）。但是，如果您使用的是 SPICE、virtio 或 virgl，则需要选择要使用的剪贴板。这是因为如果剪贴板设置为 vnc，则默认的 </span><strong><span>SPICE</span></strong><span> 剪贴板将被 </span><strong><span>VNC</span></strong><span> 剪贴板替换。</span></p><h3 id='usb-passthrough-usb-直通'><span>USB Passthrough USB 直通 </span></h3><p><span>There are two different types of USB passthrough devices:</span>
<span>有两种不同类型的 USB 直通设备：</span></p><ul><li><p><span>Host USB passthrough 主机 USB 直通</span></p></li><li><p><span>SPICE USB passthrough SPICE USB 直通</span></p></li></ul><p><span>Host USB passthrough works by giving a VM a USB device of the host. This can either be done via the vendor- and product-id, or via the host bus and port.</span>
<span>主机 USB 直通的工作原理是为 VM 提供主机的 USB 设备。这可以通过供应商和产品 ID 完成，也可以通过主机总线和端口完成。</span></p><p><span>The vendor/product-id looks like this: </span><strong><span>0123:abcd</span></strong><span>, where </span><strong><span>0123</span></strong><span> is the id of the vendor, and </span><strong><span>abcd</span></strong><span> is the id of the product, meaning two pieces of the same usb device have the same id.</span>
<span>供应商/产品 ID 如下所示：</span><strong><span>0123：abcd</span></strong><span>，其中 </span><strong><span>0123</span></strong><span> 是供应商的 ID，abcd 是产品的 ID，这意味着同一 USB 设备的两部分具有相同的 ID。</span></p><p><span>The bus/port looks like this: </span><strong><span>1-2.3.4</span></strong><span>, where </span><strong><span>1</span></strong><span> is the bus and </span><strong><span>2.3.4</span></strong><span> is the port path. This represents the physical ports of your host (depending of the internal order of the usb controllers).</span>
<span>总线/端口如下所示：</span><strong><span>1-2.3.4</span></strong><span>，其中 </span><strong><span>1</span></strong><span> 是总线，</span><strong><span>2.3.4</span></strong><span> 是端口路径。这表示主机的物理端口（取决于 USB 控制器的内部顺序）。</span></p><p><span>If a device is present in a VM configuration when the VM starts up, but the device is not present in the host, the VM can boot without problems. As soon as the device/port is available in the host, it gets passed through.</span>
<span>如果在 VM 启动时 VM 配置中存在设备，但主机中不存在该设备，则 VM 可以正常启动。一旦设备/端口在主机中可用，它就会被传递。</span></p><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAMVUlEQVRogdWZeXDVVZbHP7/f27JB%0AwtJIiCERRFlbx5FuHRrRBgtBsRIwCCOrFmGmiDBjYVNlQlgiQjU6IjI4xLJxGf5QGp0Cbaftsu3R%0Ahu6aYXqgLZoWEsjyyDP7S972e7/l3vnj5cW3Ji9M/zOn6lRS997fvd/vueece+59ipSS/89iv5mP%0AZEQQQsS23RQARVEAUFUVRVFQog0ZyogJSClld3c327Ztw7IsLMuKto90KgBsNhtVVVXMnj2bvLw8%0A7Ha7HBEJKWXGKoSQXV1dcsuWLfLSpUsyKkKIIdWyrLTqdrvlU089Jc+cOSM9Ho8Mh8NSCCEzxTRi%0A8JWVlbKtre0vAt6yLGmapmxtbZXr1q2TZ86ckW1tbSMikTH4GzduyKqqqkHwsSA1TZOhUChOg8Hg%0AoBqGIQ3DSAk+VleuXDliEspwviullD09PbzwwgscO3Yszt91XScQCNDZ2YlhGIPfuFwu7Pb48FJV%0AlZycnEG/z8/PRwiBqqqDYzweD88//zyrV69m7ty5jBs3DofDMWRgD0lASik9Hg979uzh2LFjcYEa%0ACoVob2/n2q9+hbZ585BGSCWltbVMr61NtSYbN25k7dq1zJkzZ1gSaqrGWPD79+9PAh8MBuns7OTi%0Ae+8R2rwZCYOaqTTt3cuf6+qSwAMcP36co0eP8vXXX9Pd3Y1hGMg0lk65A1HwdXV1vPHGG0mW7+jo%0A4A8/+xn2BAAAI0riQOnu3cyork7Zt3btWtavX89dd92VdieSCEgppdvt5sCBAxw5ciSuLxQK0dTU%0ARMOHHyJ37hwh1NSiAKU7djDzxRdT9q9YsYJt27YxY8aMlCTiCEgp5eXLl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AM2XKlGHBD0sgkURdXR2PP/44FRUVNwV+qP7Tp09z8ODBjNxmRAQSSRw4cIBly5axdOnSvwh4RVH4%0A4osv2L9/P2VlZRlbfkQEEkls376djo4OQqHE83bk4nK5EEKwZs0aSktLRwR+RATgOxItLS1cu3aN%0Avr6+wTfK/4tEfzeeMmUKkydPzhg8jJAAREgEg0H6+vrQNC2pFL8ZUVWVrKws8vPzycnJQVXVjH/s%0A/F/lgJiyQFHragAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Warning"></th><th><span>Using this kind of USB passthrough means that you cannot move a VM online to another host, since the hardware is only available on the host the VM is currently residing. 使用这种 USB 直通意味着您无法将 VM 联机移动到另一台主机，因为硬件仅在 VM 当前所在的主机上可用。</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><p><span>The second type of passthrough is SPICE USB passthrough. If you add one or more SPICE USB ports to your VM, you can dynamically pass a local USB device from your SPICE client through to the VM. This can be useful to redirect an input device or hardware dongle temporarily.</span>
<span>第二种类型的直通是 SPICE USB 直通。如果向 VM 添加一个或多个 SPICE USB 端口，则可以动态地将本地 USB 设备从 SPICE 客户端传递到 VM。这对于临时重定向输入设备或硬件加密狗非常有用。</span></p><p><span>It is also possible to map devices on a cluster level, so that they can be properly used with HA and hardware changes are detected and non root users can configure them. See </span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#resource_mapping'><span>Resource Mapping</span></a><span> for details on that.</span>
<span>还可以在集群级别映射设备，以便它们可以与 HA 正确使用，并且检测到硬件更改，并且非 root 用户可以配置它们。有关详细信息，请参阅</span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#resource_mapping'><span>资源映射</span></a><span>。</span></p><h3 id='bios-and-uefi-bios-和-uefi'><span>BIOS and UEFI BIOS 和 UEFI </span></h3><p><span>In order to properly emulate a computer, QEMU needs to use a firmware. Which, on common PCs often known as BIOS or (U)EFI, is executed as one of the first steps when booting a VM. It is responsible for doing basic hardware initialization and for providing an interface to the firmware and hardware for the operating system. By default QEMU uses </span><strong><span>SeaBIOS</span></strong><span> for this, which is an open-source, x86 BIOS implementation. SeaBIOS is a good choice for most standard setups.</span>
<span>为了正确模拟计算机，QEMU 需要使用固件。在通常称为 BIOS 或 （U）EFI 的普通 PC 上，这是启动 VM 时的第一步执行的。它负责执行基本的硬件初始化，并为操作系统的固件和硬件提供接口。默认情况下，QEMU 使用 </span><strong><span>SeaBIOS</span></strong><span>，这是一个开源的 x86 BIOS 实现。SeaBIOS对于大多数标准设置来说都是一个不错的选择。</span></p><p><span>Some operating systems (such as Windows 11) may require use of an UEFI compatible implementation. In such cases, you must use </span><strong><span>OVMF</span></strong><span> instead, which is an open-source UEFI implementation. [</span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnote_11'><span>11</span></a><span>]</span>
<span>某些操作系统（例如 Windows 11）可能需要使用 UEFI 兼容实现。在这种情况下，您必须改用 </span><strong><span>OVMF</span></strong><span>，这是一个开源 UEFI 实现。11]</span></p><p><span>There are other scenarios in which the SeaBIOS may not be the ideal firmware to boot from, for example if you want to do VGA passthrough. [</span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnote_12'><span>12</span></a><span>]</span>
<span>在其他情况下，SeaBIOS 可能不是启动的理想固件，例如，如果您想执行 VGA 直通。12]</span></p><p><span>If you want to use OVMF, there are several things to consider:</span>
<span>如果要使用 OVMF，需要考虑以下几点：</span></p><p><span>In order to save things like the </span><strong><span>boot order</span></strong><span>, there needs to be an EFI Disk. This disk will be included in backups and snapshots, and there can only be one.</span>
<span>为了保存</span><strong><span>启动顺序</span></strong><span>等信息，需要有一个 EFI 磁盘。此磁盘将包含在备份和快照中，并且只能有一个。</span></p><p><span>You can create such a disk with the following command:</span>
<span>您可以使用以下命令创建此类磁盘：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm set &lt;vmid&gt; -efidisk0 &lt;storage&gt;:1,format=&lt;format&gt;,efitype=4m,pre-enrolled-keys=1</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 52px;"></div><div class="CodeMirror-gutters" style="display: none; height: 52px;"></div></div></div></pre><p><span>Where </span><strong><storage></strong><span> is the storage where you want to have the disk, and </span><strong><format></strong><span> is a format which the storage supports. Alternatively, you can create such a disk through the web interface with </span><em><span>Add</span></em><span> → </span><em><span>EFI Disk</span></em><span> in the hardware section of a VM.</span>
<span>其中 </span><strong><storage></strong><span> 是您希望包含磁盘的存储，</span><strong><format></strong><span> 是存储支持的格式。或者，可以通过 Web 界面在 VM 的硬件部分中使用</span><em><span>“添加</span></em><span> </span><em><span>→ EFI 磁盘”</span></em><span>来创建此类磁盘。</span></p><p><span>The </span><strong><span>efitype</span></strong><span> option specifies which version of the OVMF firmware should be used. For new VMs, this should always be </span><em><span>4m</span></em><span>, as it supports Secure Boot and has more space allocated to support future development (this is the default in the GUI).</span>
<strong><span>efitype</span></strong><span> 选项指定应使用哪个版本的 OVMF 固件。对于新的 VM，此值应始终为 </span><em><span>4m</span></em><span>，因为它支持安全启动，并分配了更多空间以支持未来的开发（这是 GUI 中的默认设置）。</span></p><p><strong><span>pre-enroll-keys</span></strong><span> specifies if the efidisk should come pre-loaded with distribution-specific and Microsoft Standard Secure Boot keys. It also enables Secure Boot by default (though it can still be disabled in the OVMF menu within the VM).</span>
<strong><span>pre-enroll-keys</span></strong><span> 指定 efidisk 是否应预加载特定于分发的密钥和 Microsoft 标准安全启动密钥。默认情况下，它还启用安全启动（尽管仍然可以在 VM 内的 OVMF 菜单中禁用它）。</span></p><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9YHhAIJFCExAsKUkE8IAFFPIDUIqhBRSDRBUqC%0ACimFFBCBpCWx02IaZ3G2SdyxPZ7vHh6+mcnSZnFjKIge6Wj8zYzvPf9z/me5d8TM+F8WfbkNuFx5%0ABcDLLf/fAEZGRmx4eNh6enqsp6fHhoeHbWRk5D9aFeSlVqHNmzfb6H33sHnT7ZQmD5GfOMax6Sm+%0APl5h1Yc+xpYtW2SBbX1ReUkRGBkZsdH77mHLW95EOv4Ms3ueJh6YYPHUFF9aljJ63z3cf//9/5FI%0AvKQIDA8P293L2yhVjjH7t51ocDiviFecF46n7XzBreChhx4qNhH5t0XjJUVgx44ddGUZ9b/vIpQD%0AoRQIWSDJAiFL6B9axo4dO4gxAmANWVDLG+Ln82URMRGhVCqRHxonlAPqFXWKC4r6IhI6OMjMzBN4%0A/4LlTUQQEZxzZ32QJAlpmrb+p16vU6vVOHXq1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OlM07mZ07d/KOtw1TcB4sGkTDiDQ9K1IkrKeYmQC08d7pZLSiRBpE5s7aS0XAHFEK%0AAGY51Wr18g80Zmb33nsvX/z8XdSmj2AWOXhwkrxe46+79jB55Dh/3T2GxUhHextdXW2sXN7PNWtW%0AIQKDA71FFBoAjIgQkVg/a5+oHrU5zIznDhxk964xKpXKggAoTlWW8+OfPorlOQ//cjsDy1bS2dFO%0AW+diVly1iL6+Pqanpzl5qsL4pPHwN3/G1InDlMsZ7Z1tDA30cfWqIa5dexV9fb2YnT7UTxw4xsHJ%0Ao4yOjfOP8QOMjx/k4OQx7r777lY0zycXvJ02M4sxMjg4SL1eR0TYsGEDw8PD9PX10d7ejogUN3a1%0AGqpKCIE8z5mdnUVVqVarbN++nba2Nvbu3csDDzyAqrJ8+atb+zjn6e/vZ/Xq1axatYq1a9fS29tL%0AlmUMDQ1RKpXOm9EXvV6v1+tWr9eZnp5mZmaGWq1GjLHF62aiNZ+bnPfe45xrvTZzxMyYmZk56+LX%0AzKjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"></th><th><span>If you want to start using Secure Boot in an existing VM (that still uses a </span><em><span>2m</span></em><span> efidisk), you need to recreate the efidisk. To do so, delete the old one (qm set </span><vmid><span> -delete efidisk0) and add a new one as described above. This will reset any custom configurations you have made in the OVMF menu! 如果要在现有 VM（仍使用 </span><em><span>2m</span></em><span> efidisk）中开始使用安全启动，则需要重新创建 efidisk。为此，请删除旧的 （qm set </span><vmid><span> -delete efidisk0） 并添加新的，如上所述。这将重置您在 OVMF 菜单中所做的任何自定义配置！</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><p><span>When using OVMF with a virtual display (without VGA passthrough), you need to set the client resolution in the OVMF menu (which you can reach with a press of the ESC button during boot), or you have to choose SPICE as the display type.</span>
<span>当使用带有虚拟显示器（无 VGA 直通）的 OVMF 时，您需要在 OVMF 菜单中设置客户端分辨率（在启动过程中按下 ESC 按钮即可达到该菜单），或者您必须选择 SPICE 作为显示类型。</span></p><h3 id='trusted-platform-module-tpm-受信任的平台模块-tpm）'><span>Trusted Platform Module (TPM) 受信任的平台模块 （TPM） </span></h3><p><span>A </span><strong><span>Trusted Platform Module</span></strong><span> is a device which stores secret data - such as encryption keys - securely and provides tamper-resistance functions for validating system boot.</span>
<strong><span>可信平台模块</span></strong><span>是一种设备，它安全地存储秘密数据（如加密密钥），并提供防篡改功能以验证系统启动。</span></p><p><span>Certain operating systems (such as Windows 11) require such a device to be attached to a machine (be it physical or virtual).</span>
<span>某些操作系统（例如 Windows 11）需要将此类设备连接到计算机（无论是物理设备还是虚拟设备）。</span></p><p><span>A TPM is added by specifying a </span><strong><span>tpmstate</span></strong><span> volume. This works similar to an efidisk, in that it cannot be changed (only removed) once created. You can add one via the following command:</span>
<span>通过指定 </span><strong><span>tpmstate</span></strong><span> 卷来添加 TPM。这类似于 efidisk，因为它一旦创建就无法更改（只能删除）。您可以通过以下命令添加一个：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm set &lt;vmid&gt; -tpmstate0 &lt;storage&gt;:1,version=&lt;version&gt;</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>Where </span><strong><storage></strong><span> is the storage you want to put the state on, and </span><strong><version></strong><span> is either </span><em><span>v1.2</span></em><span> or </span><em><span>v2.0</span></em><span>. You can also add one via the web interface, by choosing </span><em><span>Add</span></em><span> → </span><em><span>TPM State</span></em><span> in the hardware section of a VM.</span>
<span>其中 </span><strong><storage></strong><span> 是要放置状态的存储，</span><strong><version></strong><span> 是 </span><em><span>v1.2</span></em><span> 或 </span><em><span>v2.0</span></em><span>。还可以通过 Web 界面添加一个，方法是在 VM 的硬件部分中选择</span><em><span>“添加</span></em><span> </span><em><span>TPM 状态</span></em><span>→”。</span></p><p><span>The </span><em><span>v2.0</span></em><span> TPM spec is newer and better supported, so unless you have a specific implementation that requires a </span><em><span>v1.2</span></em><span> TPM, it should be preferred.</span>
<em><span>v2.0</span></em><span> TPM 规范较新且支持更好，因此，除非你有需要 </span><em><span>v1.2</span></em><span> TPM 的特定实现，否则应首选它。</span></p><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1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vmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"></th><th><span>Compared to a physical TPM, an emulated one does </span><strong><span>not</span></strong><span> provide any real security benefits. The point of a TPM is that the data on it cannot be modified easily, except via commands specified as part of the TPM spec. Since with an emulated device the data storage happens on a regular volume, it can potentially be edited by anyone with access to it. 与物理 TPM 相比，模拟 TPM </span><strong><span>不会</span></strong><span>提供任何真正的安全优势。TPM 的要点是，除非通过作为 TPM 规范的一部分指定的命令，否则不能轻易修改其上的数据。由于使用模拟设备时，数据存储发生在常规卷上，因此任何有权访问它的人都可能对其进行编辑。</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><h3 id='inter-vm-shared-memory-虚拟机间共享内存'><span>Inter-VM shared memory 虚拟机间共享内存 </span></h3><p><span>You can add an Inter-VM shared memory device (ivshmem), which allows one to share memory between the host and a guest, or also between multiple guests.</span>
<span>您可以添加虚拟机间共享内存设备 （ivshmem），该设备允许在主机和客户机之间共享内存，或者在多个客户机之间共享内存。</span></p><p><span>To add such a device, you can use qm:</span>
<span>要添加这样的设备，您可以使用 qm：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm set &lt;vmid&gt; -ivshmem size=32,name=foo</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>Where the size is in MiB. The file will be located under /dev/shm/pve-shm-$name (the default name is the vmid).</span>
<span>其中大小以 MiB 为单位。该文件将位于 /dev/shm/pve-shm-$name（默认名称为 vmid）下。</span></p><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9YHhAIJFCExAsKUkE8IAFFPIDUIqhBRSDRBUqC%0ACimFFBCBpCWx02IaZ3G2SdyxPZ7vHh6+mcnSZnFjKIge6Wj8zYzvPf9z/me5d8TM+F8WfbkNuFx5%0ABcDLLf/fAEZGRmx4eNh6enqsp6fHhoeHbWRk5D9aFeSlVqHNmzfb6H33sHnT7ZQmD5GfOMax6Sm+%0APl5h1Yc+xpYtW2SBbX1ReUkRGBkZsdH77mHLW95EOv4Ms3ueJh6YYPHUFF9aljJ63z3cf//9/5FI%0AvKQIDA8P293L2yhVjjH7t51ocDiviFecF46n7XzBreChhx4qNhH5t0XjJUVgx44ddGUZ9b/vIpQD%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MamaaUOl5WRrzg00viuKWWxpQUOH%0ANAZFQRpD48Xlkig0MTHBB95zG+VSylz1KCbWyDOh2XyK+56IqjWMKigkUnzWnPPFFFRRLZ29SQRU%0AELOGY4pZ6LKOlM07mZ07d/KOtw1TcB4sGkTDiDQ9K1IkrKeYmQC08d7pZLSiRBpE5s7aS0XAHFEK%0AAGY51Wr18g80Zmb33nsvX/z8XdSmj2AWOXhwkrxe46+79jB55Dh/3T2GxUhHextdXW2sXN7PNWtW%0AIQKDA71FFBoAjIgQkVg/a5+oHrU5zIznDhxk964xKpXKggAoTlWW8+OfPorlOQ//cjsDy1bS2dFO%0AW+diVly1iL6+Pqanpzl5qsL4pPHwN3/G1InDlMsZ7Z1tDA30cfWqIa5dexV9fb2YnT7UTxw4xsHJ%0Ao4yOjfOP8QOMjx/k4OQx7r777lY0zycXvJ02M4sxMjg4SL1eR0TYsGEDw8PD9PX10d7ejogUN3a1%0AGqpKCIE8z5mdnUVVqVarbN++nba2Nvbu3csDDzyAqrJ8+atb+zjn6e/vZ/Xq1axatYq1a9fS29tL%0AlmUMDQ1RKpXOm9EXvV6v1+tWr9eZnp5mZmaGWq1GjLHF62aiNZ+bnPfe45xrvTZzxMyYmZk56+LX%0AzKjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"></th><th><span>Currently the device will get deleted as soon as any VM using it got shutdown or stopped. Open connections will still persist, but new connections to the exact same device cannot be made anymore. 目前，一旦使用该设备的任何 VM 关闭或停止，该设备就会被删除。打开的连接仍将保留，但无法再与完全相同的设备建立新的连接。</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><p><span>A use case for such a device is the Looking Glass [</span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnote_13'><span>13</span></a><span>] project, which enables high performance, low-latency display mirroring between host and guest.</span>
<span>此类设备的一个用例是 Looking Glass 13] 项目，该项目可在主机和访客之间实现高性能、低延迟的显示镜像。</span></p><h3 id='audio-device-音频设备'><span>Audio Device 音频设备 </span></h3><p><span>To add an audio device run the following command:</span>
<span>要添加音频设备，请运行以下命令：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">qm set &lt;vmid&gt; -audio0 device=&lt;device&gt;</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>Supported audio devices are:</span>
<span>支持的音频设备包括：</span></p><ul><li><p><span>ich9-intel-hda: Intel HD Audio Controller, emulates ICH9</span>
<span>ich9-intel-had：Intel HD 音频控制器，模拟 ICH9</span></p></li><li><p><span>intel-hda: Intel HD Audio Controller, emulates ICH6</span>
<span>intel-had：Intel HD 音频控制器，模拟 ICH6</span></p></li><li><p><span>AC97: Audio Codec &#39;97, useful for older operating systems like Windows XP</span>
<span>AC97：音频编解码器 &#39;97，适用于较旧的操作系统，如 Windows XP</span></p></li></ul><p><span>There are two backends available:</span>
<span>有两个后端可用：</span></p><ul><li><p><em><span>spice 香料</span></em></p></li><li><p><em><span>none 没有</span></em></p></li></ul><p><span>The </span><em><span>spice</span></em><span> backend can be used in combination with </span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_display'><span>SPICE</span></a><span> while the </span><em><span>none</span></em><span> backend can be useful if an audio device is needed in the VM for some software to work. To use the physical audio device of the host use device passthrough (see </span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_pci_passthrough'><span>PCI Passthrough</span></a><span> and </span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_usb_passthrough'><span>USB Passthrough</span></a><span>). Remote protocols like Microsoft’s RDP have options to play sound.</span>
<em><span>spice</span></em><span> 后端可以与 </span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_display'><span>SPICE</span></a><span> 结合使用，而 none 后端如果 VM 中需要音频设备来运行某些软件，则 </span><em><span>none</span></em><span> 后端可能很有用。要使用主机的物理音频设备，请使用设备直通（请参阅 </span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_pci_passthrough'><span>PCI 直通</span></a><span>和 </span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_usb_passthrough'><span>USB 直通</span></a><span>）。像 Microsoft 的 RDP 这样的远程协议具有播放声音的选项。</span></p><h3 id='virtio-rng'><span>VirtIO RNG </span></h3><p><span>A RNG (Random Number Generator) is a device providing entropy (</span><em><span>randomness</span></em><span>) to a system. A virtual hardware-RNG can be used to provide such entropy from the host system to a guest VM. This helps to avoid entropy starvation problems in the guest (a situation where not enough entropy is available and the system may slow down or run into problems), especially during the guests boot process.</span>
<span>RNG（随机数生成器）是一种为系统提供熵（</span><em><span>随机性</span></em><span>）的设备。虚拟硬件 RNG 可用于将此类熵从主机系统提供给客户机虚拟机。这有助于避免客户机中的熵饥饿问题（可用的熵不足，系统可能会变慢或遇到问题的情况），尤其是在客户机启动过程中。</span></p><p><span>To add a VirtIO-based emulated RNG, run the following command:</span>
<span>要添加基于 VirtIO 的模拟 RNG，请运行以下命令：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">qm set &lt;vmid&gt; -rng0 source=&lt;source&gt;[,max_bytes=X,period=Y]</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>source specifies where entropy is read from on the host and has to be one of the following:</span>
<span>source 指定从主机上读取熵的位置，并且必须是以下值之一：</span></p><ul><li><p><span>/dev/urandom: Non-blocking kernel entropy pool (preferred)</span>
<span>/dev/urandom：非阻塞内核熵池（首选）</span></p></li><li><p><span>/dev/random: Blocking kernel pool (not recommended, can lead to entropy starvation on the host system)</span>
<span>/dev/random：阻塞内核池（不推荐，可能导致主机系统上的熵饥饿）</span></p></li><li><p><span>/dev/hwrng: To pass through a hardware RNG attached to the host (if multiple are available, the one selected in /sys/devices/virtual/misc/hw_random/rng_current will be used)</span>
<span>/dev/hwrng：要传递连接到主机的硬件 RNG（如果有多个可用，将使用 /sys/devices/virtual/misc/hw_random/rng_current 中选择的那个）</span></p></li></ul><p><span>A limit can be specified via the max_bytes and period parameters, they are read as max_bytes per period in milliseconds. However, it does not represent a linear relationship: 1024B/1000ms would mean that up to 1 KiB of data becomes available on a 1 second timer, not that 1 KiB is streamed to the guest over the course of one second. Reducing the period can thus be used to inject entropy into the guest at a faster rate.</span>
<span>可以通过 max_bytes 和 period 参数指定限制，它们以毫秒为单位读取为每个周期的 max_bytes。但是，它并不表示线性关系：1024B/1000 毫秒意味着在 1 秒计时器上最多有 1 KiB 的数据可用，而不是在 1 秒内将 1 KiB 流式传输到来宾。因此，减少周期可用于以更快的速度将熵注入客人。</span></p><p><span>By default, the limit is set to 1024 bytes per 1000 ms (1 KiB/s). It is recommended to always use a limiter to avoid guests using too many host resources. If desired, a value of </span><em><span>0</span></em><span> for max_bytes can be used to disable all limits.</span>
<span>默认情况下，限制设置为每 1000 毫秒 （1 KiB/s） 1024 字节。建议始终使用限制器，以避免来宾使用过多的主机资源。如果需要，可以使用值 </span><em><span>0</span></em><span> 表示 max_bytes 来禁用所有限制。</span></p><h3 id='device-boot-order-设备启动顺序'><span>Device Boot Order 设备启动顺序 </span></h3><p><span>QEMU can tell the guest which devices it should boot from, and in which order. This can be specified in the config via the boot property, for example:</span>
<span>QEMU 可以告诉客户机它应该从哪些设备启动，以及以什么顺序启动。这可以通过 boot 属性在配置中指定，例如：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">boot: order=scsi0;net0;hostpci0</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><a href='https://pve.proxmox.com/pve-docs/images/screenshot/gui-qemu-edit-bootorder.png'><img src="https://pve.proxmox.com/pve-docs/images/screenshot/gui-qemu-edit-bootorder.png" referrerpolicy="no-referrer" alt="screenshot/gui-qemu-edit-bootorder.png"></a></p><p><span>This way, the guest would first attempt to boot from the disk scsi0, if that fails, it would go on to attempt network boot from net0, and in case that fails too, finally attempt to boot from a passed through PCIe device (seen as disk in case of NVMe, otherwise tries to launch into an option ROM).</span>
<span>这样，客户机将首先尝试从磁盘 scsi0 启动，如果失败，它将继续尝试从 net0 进行网络启动，如果也失败，最后尝试从传递的 PCIe 设备启动（在 NVMe 的情况下被视为磁盘，否则尝试启动到选项 ROM）。</span></p><p><span>On the GUI you can use a drag-and-drop editor to specify the boot order, and use the checkbox to enable or disable certain devices for booting altogether.</span>
<span>在 GUI 上，您可以使用拖放编辑器来指定启动顺序，并使用复选框来启用或禁用某些设备以进行完全启动。</span></p><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9YHhAIJFCExAsKUkE8IAFFPIDUIqhBRSDRBUqC%0ACimFFBCBpCWx02IaZ3G2SdyxPZ7vHh6+mcnSZnFjKIge6Wj8zYzvPf9z/me5d8TM+F8WfbkNuFx5%0ABcDLLf/fAEZGRmx4eNh6enqsp6fHhoeHbWRk5D9aFeSlVqHNmzfb6H33sHnT7ZQmD5GfOMax6Sm+%0APl5h1Yc+xpYtW2SBbX1ReUkRGBkZsdH77mHLW95EOv4Ms3ueJh6YYPHUFF9aljJ63z3cf//9/5FI%0AvKQIDA8P293L2yhVjjH7t51ocDiviFecF46n7XzBreChhx4qNhH5t0XjJUVgx44ddGUZ9b/vIpQD%0AoRQIWSDJAiFL6B9axo4dO4gxAmANWVDLG+Ln82URMRGhVCqRHxonlAPqFXWKC4r6IhI6OMjMzBN4%0A/4LlTUQQEZxzZ32QJAlpmrb+p16vU6vVOHXq1AWjN18AnDj0F971vrs4OnmYJVkoDA4FCPUO172I%0ACgnt7SV++4vvsGhRJx3tJbIsRVVpsUnOBBABB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wr18g80Zmb33nsvX/z8XdSmj2AWOXhwkrxe46+79jB55Dh/3T2GxUhHextdXW2sXN7PNWtW%0AIQKDA71FFBoAjIgQkVg/a5+oHrU5zIznDhxk964xKpXKggAoTlWW8+OfPorlOQ//cjsDy1bS2dFO%0AW+diVly1iL6+Pqanpzl5qsL4pPHwN3/G1InDlMsZ7Z1tDA30cfWqIa5dexV9fb2YnT7UTxw4xsHJ%0Ao4yOjfOP8QOMjx/k4OQx7r777lY0zycXvJ02M4sxMjg4SL1eR0TYsGEDw8PD9PX10d7ejogUN3a1%0AGqpKCIE8z5mdnUVVqVarbN++nba2Nvbu3csDDzyAqrJ8+atb+zjn6e/vZ/Xq1axatYq1a9fS29tL%0AlmUMDQ1RKpXOm9EXvV6v1+tWr9eZnp5mZmaGWq1GjLHF62aiNZ+bnPfe45xrvTZzxMyYmZk56+LX%0AzKjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"></th><th><span>If your guest uses multiple disks to boot the OS or load the bootloader, all of them must be marked as </span><em><span>bootable</span></em><span> (that is, they must have the checkbox enabled or appear in the list in the config) for the guest to be able to boot. This is because recent SeaBIOS and OVMF versions only initialize disks if they are marked </span><em><span>bootable</span></em><span>. 如果客户机使用多个磁盘来启动操作系统或加载引导加载程序，则必须将所有磁盘标记为</span><em><span>可启动</span></em><span>（即，它们必须启用复选框或显示在配置的列表中），客户机才能启动。这是因为最近的 SeaBIOS 和 OVMF 版本仅在磁盘被标记为</span><em><span>可启动</span></em><span>时才初始化磁盘。</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><p><span>In any case, even devices not appearing in the list or having the checkmark disabled will still be available to the guest, once it’s operating system has booted and initialized them. The </span><em><span>bootable</span></em><span> flag only affects the guest BIOS and bootloader.</span>
<span>在任何情况下，一旦操作系统启动并初始化了它们，即使未出现在列表中或未禁用复选标记的设备仍将可供客户使用。</span><em><span>bootable</span></em><span> 标志仅影响客户机 BIOS 和引导加载程序。</span></p><h3 id='automatic-start-and-shutdown-of-virtual-machines-自动启动和关闭虚拟机'><span>Automatic Start and Shutdown of Virtual Machines 自动启动和关闭虚拟机 </span></h3><p><span>After creating your VMs, you probably want them to start automatically when the host system boots. For this you need to select the option </span><em><span>Start at boot</span></em><span> from the </span><em><span>Options</span></em><span> Tab of your VM in the web interface, or set it with the following command:</span>
<span>创建 VM 后，您可能希望它们在主机系统启动时自动启动。为此，您需要从 Web 界面中 VM 的“</span><em><span>选项</span></em><span>”选项卡中选择“</span><em><span>启动时启动</span></em><span>”选项，或使用以下命令进行设置：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm set &lt;vmid&gt; -onboot 1</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><a href='https://pve.proxmox.com/pve-docs/images/screenshot/gui-qemu-edit-start-order.png'><img src="https://pve.proxmox.com/pve-docs/images/screenshot/gui-qemu-edit-start-order.png" referrerpolicy="no-referrer" alt="screenshot/gui-qemu-edit-start-order.png"></a></p><p><span>Start and Shutdown Order 启动和关闭顺序</span></p><p><span>In some case you want to be able to fine tune the boot order of your VMs, for instance if one of your VM is providing firewalling or DHCP to other guest systems. For this you can use the following parameters:</span>
<span>在某些情况下，您希望能够微调 VM 的启动顺序，例如，如果其中一个 VM 向其他客户系统提供防火墙或 DHCP。为此，您可以使用以下参数：</span></p><ul><li><p><strong><span>Start/Shutdown order</span></strong><span>: Defines the start order priority. For example, set it to 1 if you want the VM to be the first to be started. (We use the reverse startup order for shutdown, so a machine with a start order of 1 would be the last to be shut down). If multiple VMs have the same order defined on a host, they will additionally be ordered by </span><em><span>VMID</span></em><span> in ascending order.</span>
<strong><span>启动/关闭顺序</span></strong><span>：定义启动顺序优先级。例如，如果希望 VM 是第一个启动的 VM，请将其设置为 1。（我们使用反向启动顺序进行关机，因此启动顺序为 1 的机器将是最后关闭的机器）。如果多个虚拟机在主机上定义了相同的顺序，则 </span><em><span>VMID</span></em><span> 将按升序对它们进行额外排序。</span></p></li><li><p><strong><span>Startup delay</span></strong><span>: Defines the interval between this VM start and subsequent VMs starts. For example, set it to 240 if you want to wait 240 seconds before starting other VMs.</span>
<strong><span>启动延迟</span></strong><span>：定义此 VM 启动与后续 VM 启动之间的间隔。例如，如果要在启动其他 VM 之前等待 240 秒，请将其设置为 240。</span></p></li><li><p><strong><span>Shutdown timeout</span></strong><span>: Defines the duration in seconds Proxmox VE should wait for the VM to be offline after issuing a shutdown command. By default this value is set to 180, which means that Proxmox VE will issue a shutdown request and wait 180 seconds for the machine to be offline. If the machine is still online after the timeout it will be stopped forcefully.</span>
<strong><span>关机超时</span></strong><span>：定义 Proxmox VE 在发出关机命令后应等待 VM 脱机的持续时间（以秒为单位）。默认情况下，此值设置为 180，这意味着 Proxmox VE 将发出关机请求并等待 180 秒让机器脱机。如果超时后机器仍然在线，它将被强制停止。</span></p></li></ul><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9YHhAIJFCExAsKUkE8IAFFPIDUIqhBRSDRBUqC%0ACimFFBCBpCWx02IaZ3G2SdyxPZ7vHh6+mcnSZnFjKIge6Wj8zYzvPf9z/me5d8TM+F8WfbkNuFx5%0ABcDLLf/fAEZGRmx4eNh6enqsp6fHhoeHbWRk5D9aFeSlVqHNmzfb6H33sHnT7ZQmD5GfOMax6Sm+%0APl5h1Yc+xpYtW2SBbX1ReUkRGBkZsdH77mHLW95EOv4Ms3ueJh6YYPHUFF9aljJ63z3cf//9/5FI%0AvKQIDA8P293L2yhVjjH7t51ocDiviFecF46n7XzBreChhx4qNhH5t0XjJUVgx44ddGUZ9b/vIpQD%0AoRQIWSDJAiFL6B9axo4dO4gxAmANWVDLG+Ln82URMRGhVCqRHxonlAPqFXWKC4r6IhI6OMjMzBN4%0A/4LlTUQQEZxzZ32QJAlpmrb+p16vU6vVOHXq1AWjN18AnDj0F971vrs4OnmYJVkoDA4FCPUO172I%0ACgnt7SV++4vvsGhRJx3tJbIsRVVpsUnOBBABBVFEClKYwbKr7sTM7EIUnBcA7z21k7t49x1X8JXv%0AbOWra7rw5QRtcN8PLCfvvZJvb9vJycpJpg4/hp/N0I4SMQs4Jw0A5zBXHGiCaIZIKABgpGlKjP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TlWW8+OfPorlOQ//cjsDy1bS2dFO%0AW+diVly1iL6+Pqanpzl5qsL4pPHwN3/G1InDlMsZ7Z1tDA30cfWqIa5dexV9fb2YnT7UTxw4xsHJ%0Ao4yOjfOP8QOMjx/k4OQx7r777lY0zycXvJ02M4sxMjg4SL1eR0TYsGEDw8PD9PX10d7ejogUN3a1%0AGqpKCIE8z5mdnUVVqVarbN++nba2Nvbu3csDDzyAqrJ8+atb+zjn6e/vZ/Xq1axatYq1a9fS29tL%0AlmUMDQ1RKpXOm9EXvV6v1+tWr9eZnp5mZmaGWq1GjLHF62aiNZ+bnPfe45xrvTZzxMyYmZk56+LX%0AzKjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"></th><th><span>VMs managed by the HA stack do not follow the </span><em><span>start on boot</span></em><span> and </span><em><span>boot order</span></em><span> options currently. Those VMs will be skipped by the startup and shutdown algorithm as the HA manager itself ensures that VMs get started and stopped. 由 HA 堆栈管理的 VM 当前不遵循“</span><em><span>启动时启动</span></em><span>”和</span><em><span>“启动顺序</span></em><span>”选项。启动和关闭算法将跳过这些 VM，因为 HA 管理器本身会确保 VM 启动和停止。</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><p><span>Please note that machines without a Start/Shutdown order parameter will always start after those where the parameter is set. Further, this parameter can only be enforced between virtual machines running on the same host, not cluster-wide.</span>
<span>请注意，没有启动/关闭顺序参数的机器将始终在设置了参数的机器之后启动。此外，此参数只能在同一主机上运行的虚拟机之间强制执行，而不能在集群范围内强制执行。</span></p><p><span>If you require a delay between the host boot and the booting of the first VM, see the section on Proxmox VE Node Management.</span>
<span>如果需要在主机启动和第一个 VM 启动之间有延迟，请参阅 Proxmox VE 节点管理部分。</span></p><h3 id='qemu-guest-agent-qemu-客户机代理'><span>QEMU Guest Agent QEMU 客户机代理 </span></h3><p><span>The QEMU Guest Agent is a service which runs inside the VM, providing a communication channel between the host and the guest. It is used to exchange information and allows the host to issue commands to the guest.</span>
<span>QEMU Guest Agent 是一项在 VM 内部运行的服务，在主机和 Guest 之间提供通信通道。它用于交换信息，并允许主机向客人发出命令。</span></p><p><span>For example, the IP addresses in the VM summary panel are fetched via the guest agent.</span>
<span>例如，VM 摘要面板中的 IP 地址是通过客户机代理获取的。</span></p><p><span>Or when starting a backup, the guest is told via the guest agent to sync outstanding writes via the </span><em><span>fs-freeze</span></em><span> and </span><em><span>fs-thaw</span></em><span> commands.</span>
<span>或者，在启动备份时，客户机代理会通过 </span><em><span>fs-freeze</span></em><span> 和 </span><em><span>fs-thaw</span></em><span> 命令通知客户机同步未完成的写入操作。</span></p><p><span>For the guest agent to work properly the following steps must be taken:</span>
<span>要使客户机代理正常工作，必须执行以下步骤：</span></p><ul><li><p><span>install the agent in the guest and make sure it is running</span>
<span>在客户机中安装代理，并确保其正在运行</span></p></li><li><p><span>enable the communication via the agent in Proxmox VE</span>
<span>在Proxmox VE中通过代理启用通信</span></p></li></ul><h4 id='install-guest-agent-安装-guest-agent'><span>Install Guest Agent 安装 Guest Agent</span></h4><p><span>For most Linux distributions, the guest agent is available. The package is usually named qemu-guest-agent.</span>
<span>对于大多数 Linux 发行版，客户机代理都可用。该软件包通常被命名为 qemu-guest-agent。</span></p><p><span>For Windows, it can be installed from the </span><a href='https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso'><span>Fedora VirtIO driver ISO</span></a><span>.</span>
<span>对于 Windows，可以从 </span><a href='https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso'><span>Fedora VirtIO 驱动程序 ISO</span></a><span> 安装。</span></p><h4 id='enable-guest-agent-communication-启用客户机代理通信'><span>Enable Guest Agent Communication 启用客户机代理通信</span></h4><p><span>Communication from Proxmox VE with the guest agent can be enabled in the VM’s </span><strong><span>Options</span></strong><span> panel. A fresh start of the VM is necessary for the changes to take effect.</span>
<span>可以在VM的</span><strong><span>选项</span></strong><span>面板中启用Proxmox VE与客户代理的通信。要使更改生效，必须重新启动 VM。</span></p><h4 id='automatic-trim-using-qga-使用qga的自动trim'><span>Automatic TRIM Using QGA 使用QGA的自动TRIM</span></h4><p><span>It is possible to enable the </span><em><span>Run guest-trim</span></em><span> option. With this enabled, Proxmox VE will issue a trim command to the guest after the following operations that have the potential to write out zeros to the storage:</span>
<span>可以启用 </span><em><span>Run guest-trim</span></em><span> 选项。启用此功能后，Proxmox VE 将在执行以下操作后向客户发出 trim 命令，这些操作可能会将零写出到存储中：</span></p><ul><li><p><span>moving a disk to another storage</span>
<span>将磁盘移动到另一个存储</span></p></li><li><p><span>live migrating a VM to another node with local storage</span>
<span>将 VM 实时迁移到具有本地存储的另一个节点</span></p></li></ul><p><span>On a thin provisioned storage, this can help to free up unused space.</span>
<span>在精简预配的存储上，这有助于释放未使用的空间。</span></p><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9YHhAIJFCExAsKUkE8IAFFPIDUIqhBRSDRBUqC%0ACimFFBCBpCWx02IaZ3G2SdyxPZ7vHh6+mcnSZnFjKIge6Wj8zYzvPf9z/me5d8TM+F8WfbkNuFx5%0ABcDLLf/fAEZGRmx4eNh6enqsp6fHhoeHbWRk5D9aFeSlVqHNmzfb6H33sHnT7ZQmD5GfOMax6Sm+%0APl5h1Yc+xpYtW2SBbX1ReUkRGBkZsdH77mHLW95EOv4Ms3ueJh6YYPHUFF9aljJ63z3cf//9/5FI%0AvKQIDA8P293L2yhVjjH7t51ocDiviFecF46n7XzBreChhx4qNhH5t0XjJUVgx44ddGUZ9b/vIpQD%0AoRQIW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5WRrzg00viuKWWxpQUOH%0ANAZFQRpD48Xlkig0MTHBB95zG+VSylz1KCbWyDOh2XyK+56IqjWMKigkUnzWnPPFFFRRLZ29SQRU%0AELOGY4pZ6LKOlM07mZ07d/KOtw1TcB4sGkTDiDQ9K1IkrKeYmQC08d7pZLSiRBpE5s7aS0XAHFEK%0AAGY51Wr18g80Zmb33nsvX/z8XdSmj2AWOXhwkrxe46+79jB55Dh/3T2GxUhHextdXW2sXN7PNWtW%0AIQKDA71FFBoAjIgQkVg/a5+oHrU5zIznDhxk964xKpXKggAoTlWW8+OfPorlOQ//cjsDy1bS2dFO%0AW+diVly1iL6+Pqanpzl5qsL4pPHwN3/G1InDlMsZ7Z1tDA30cfWqIa5dexV9fb2YnT7UTxw4xsHJ%0Ao4yOjfOP8QOMjx/k4OQx7r777lY0zycXvJ02M4sxMjg4SL1eR0TYsGEDw8PD9PX10d7ejogUN3a1%0AGqpKCIE8z5mdnUVVqVarbN++nba2Nvbu3csDDzyAqrJ8+atb+zjn6e/vZ/Xq1axatYq1a9fS29tL%0AlmUMDQ1RKpXOm9EXvV6v1+tWr9eZnp5mZmaGWq1GjLHF62aiNZ+bnPfe45xrvTZzxMyYmZk56+LX%0AzKjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"></th><th><span>There is a caveat with ext4 on Linux, because it uses an in-memory optimization to avoid issuing duplicate TRIM requests. Since the guest doesn’t know about the change in the underlying storage, only the first guest-trim will run as expected. Subsequent ones, until the next reboot, will only consider parts of the filesystem that changed since then. Linux 上的 ext4 有一个警告，因为它使用内存优化来避免发出重复的 TRIM 请求。由于客户机不知道底层存储中的更改，因此只有第一个客户机修剪将按预期运行。在下次重新启动之前，后续操作将仅考虑自那时以来更改的文件系统部分。</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><h4 id='filesystem-freeze--thaw-on-backup-文件系统在备份时冻结和解冻'><span>Filesystem Freeze &amp; Thaw on Backup 文件系统在备份时冻结和解冻</span></h4><p><span>By default, guest filesystems are synced via the </span><em><span>fs-freeze</span></em><span> QEMU Guest Agent Command when a backup is performed, to provide consistency.</span>
<span>默认情况下，在执行备份时，客户机文件系统通过 </span><em><span>fs-freeze</span></em><span> QEMU Guest Agent 命令进行同步，以提供一致性。</span></p><p><span>On Windows guests, some applications might handle consistent backups themselves by hooking into the Windows VSS (Volume Shadow Copy Service) layer, a </span><em><span>fs-freeze</span></em><span> then might interfere with that. For example, it has been observed that calling </span><em><span>fs-freeze</span></em><span> with some SQL Servers triggers VSS to call the SQL Writer VSS module in a mode that breaks the SQL Server backup chain for differential backups.</span>
<span>在 Windows 客户机上，某些应用程序可能会通过挂接到 Windows VSS（卷影复制服务）层来自行处理一致的备份，然后 </span><em><span>fs-freeze</span></em><span> 可能会干扰该层。例如，据观察，使用某些 SQL Server 调用 </span><em><span>fs-freeze</span></em><span> 会触发 VSS 以中断 SQL Server 备份链以进行差异备份的模式调用 SQL 编写器 VSS 模块。</span></p><p><span>For such setups you can configure Proxmox VE to not issue a freeze-and-thaw cycle on backup by setting the freeze-fs-on-backup QGA option to 0. This can also be done via the GUI with the </span><em><span>Freeze/thaw guest filesystems on backup for consistency</span></em><span> option.</span>
<span>对于此类设置，您可以通过将 freeze-fs-on-backup QGA 选项设置为 0，将 Proxmox VE 配置为不在备份时发出冻融循环。这也可以通过 GUI 来完成，其中包含 </span><em><span>Freeze/thaw guest filesystems on backup for consistency</span></em><span> 选项。</span></p><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAALa0lEQVRogdWZa2wc1RXHfzM7O/te%0AP9e1vXHSmEdjx3YeDkkaF6REKRRCEDSEFNkRjdSWSsgC2iqoRWqL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8jXX4N68Gc8111BUVER5eTnV1dVUV1cTCASuFFqGYaDr%0AupFKpYjH40xMTDA+Ps7Y2Bjj4+OEw2EmenqYPneO1OAgZCWpxTY9S9QMcLhyHGUDRI8HqbISZ309%0AzoYGnE4nHo8Hv99PaWkpgUCAiooK6/DE4XCkI1HW2a6hqiqKojA9Pc3k5KQl4XCY6elpotFoetuk%0Av59UKIR66RLToRBJTcMYHUWIRvMSMPO6rbY2/SsIOFatQpYk5NWrkSQJWZZxOBy43W68Xi9+v5+i%0AoiJKSkooLi7G5/PhdruRZdnads85HzD3hpLJJIqiEIvFiEajRCIRIpEI0WiUWCxGPB631iOKopBK%0ApazUbi4Oc7Y+snKCzWbDZrMhSRKSJGG3262w6HK5cLlceDwevF4vPp8Pr9eL2+3G5XLhcDjMkxuE%0ATNibdcBhnv9qmkYqlSKZTJJIJFAUhXg8jqIoKIpCIpGwSCSTSVRVtWSuk3qTiAnebrfngHc4HDid%0ATpxOJy6Xy7qWZdk6wZzrxCbvCY1JRNd1NE3LAWgSM69ngp+PgCiK1gF3NhFTzHvmO+Y3wCzw8xLI%0AJpL5tYCZpEyw2f/nWt1ag2UtM0x3Mq1iAp1j+bH0M7KFCGWDnfmbd8AMnuxfUzL/C0rp/wFnFd4n%0AEQn3XQAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Important"></th><th><span>Disabling this option can potentially lead to backups with inconsistent filesystems and should therefore only be disabled if you know what you are doing. 禁用此选项可能会导致备份文件系统不一致，因此，只有在您知道自己在做什么时才应禁用此选项。</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><h4 id='troubleshooting-故障-排除'><span>Troubleshooting 故障 排除</span></h4><p><span>VM does not shut down</span>
<span>VM 未关闭</span></p><p><span>Make sure the guest agent is installed and running.</span>
<span>确保客户机代理已安装并正在运行。</span></p><p><span>Once the guest agent is enabled, Proxmox VE will send power commands like </span><em><span>shutdown</span></em><span> via the guest agent. If the guest agent is not running, commands cannot get executed properly and the shutdown command will run into a timeout.</span>
<span>启用客户代理后，Proxmox VE 将通过客户代理发送电源命令，例如</span><em><span>关机</span></em><span>。如果客户机代理未运行，则命令无法正确执行，并且 shutdown 命令将陷入超时。</span></p><h3 id='spice-enhancements-spice增强功能'><span>SPICE Enhancements SPICE增强功能 </span></h3><p><span>SPICE Enhancements are optional features that can improve the remote viewer experience.</span>
<span>SPICE 增强功能是可选功能，可以改善远程查看者体验。</span></p><p><span>To enable them via the GUI go to the </span><strong><span>Options</span></strong><span> panel of the virtual machine. Run the following command to enable them via the CLI:</span>
<span>要通过 GUI 启用它们，请转到虚拟机的</span><strong><span>“选项</span></strong><span>”面板。运行以下命令以通过 CLI 启用它们：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">qm set &lt;vmid&gt; -spice_enhancements foldersharing=1,videostreaming=all</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 52px;"></div><div class="CodeMirror-gutters" style="display: none; height: 52px;"></div></div></div></pre><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9YHhAIJFCExAsKUkE8IAFFPIDUIqhBRSDRBUqC%0ACimFFBCBpCWx02IaZ3G2SdyxPZ7vHh6+mcnSZnFjKIge6Wj8zYzvPf9z/me5d8TM+F8WfbkNuFx5%0ABcDLLf/fAEZGRmx4eNh6enqsp6fHhoeHbWRk5D9aFeSlVqHNmzfb6H33sHnT7ZQmD5GfOMax6Sm+%0APl5h1Yc+xpYtW2SBbX1ReUkRGBkZsdH77mHLW95EOv4Ms3ueJh6YYPHUFF9aljJ63z3cf//9/5FI%0AvKQIDA8P293L2yhVjjH7t51ocDiviFecF46n7XzBreChhx4qNhH5t0XjJUVgx44ddGUZ9b/vIpQD%0AoRQIWSDJAiFL6B9axo4dO4gxAmANWVDLG+Ln82URMRGhVCqRHxonlAPqFXWKC4r6IhI6OMjMzBN4%0A/4LlTUQQEZxzZ32QJAlpmrb+p16vU6vVOHXq1AWjN18AnDj0F971vrs4OnmYJVkoDA4FCPUO172I%0ACgnt7SV++4vvsGhRJx3tJbIsRVVpsUnOBBABBVFEClKYwbKr7sTM7EIUnBcA7z21k7t49x1X8JXv%0AbOWra7rw5QRtcN8PLCfvvZJvb9vJycpJpg4/hp/N0I4SMQs4Jw0A5zBXHGiCaIZIKABgpGlKjPEF%0A0TpT5pUDRXiVt99+Le03r+WzuytM1gO6pB/3+o0cbxvk8yOPMjW6i2iR2lxOjJDHSDMFogmGwzQ7%0ArRJA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V9fb2YnT7UTxw4xsHJ%0Ao4yOjfOP8QOMjx/k4OQx7r777lY0zycXvJ02M4sxMjg4SL1eR0TYsGEDw8PD9PX10d7ejogUN3a1%0AGqpKCIE8z5mdnUVVqVarbN++nba2Nvbu3csDDzyAqrJ8+atb+zjn6e/vZ/Xq1axatYq1a9fS29tL%0AlmUMDQ1RKpXOm9EXvV6v1+tWr9eZnp5mZmaGWq1GjLHF62aiNZ+bnPfe45xrvTZzxMyYmZk56+LX%0AzKjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"></th><th><span>To use these features the </span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_display'><strong><span>Display</span></strong></a><span> of the virtual machine must be set to SPICE (qxl). 要使用这些功能，必须将虚拟机的</span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_display'><strong><span>显示</span></strong></a><span>设置为 SPICE （qxl）。</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><h4 id='folder-sharing-文件夹共享'><span>Folder Sharing 文件夹共享</span></h4><p><span>Share a local folder with the guest. The spice-webdavd daemon needs to be installed in the guest. It makes the shared folder available through a local WebDAV server located at </span><a href='http://localhost:9843/'><span>http://localhost:9843</span></a><span>.</span>
<span>与客户机共享本地文件夹。spice-webdavd 守护进程需要安装在客户机中。它使共享文件夹可以通过位于 </span><a href='http://localhost:9843/'><span>http://localhost:9843</span></a><span> 的本地 WebDAV 服务器使用。</span></p><p><span>For Windows guests the installer for the </span><em><span>Spice WebDAV daemon</span></em><span> can be downloaded from the </span><a href='https://www.spice-space.org/download.html#windows-binaries'><span>official SPICE website</span></a><span>.</span>
<span>对于 Windows 客户机，可以从 </span><a href='https://www.spice-space.org/download.html#windows-binaries'><span>SPICE 官方网站</span></a><span>下载 </span><em><span>Spice WebDAV 守护进程</span></em><span>的安装程序。</span></p><p><span>Most Linux distributions have a package called spice-webdavd that can be installed.</span>
<span>大多数 Linux 发行版都有一个名为 spice-webdavd 的包，可以安装。</span></p><p><span>To share a folder in Virt-Viewer (Remote Viewer) go to </span><em><span>File → Preferences</span></em><span>. Select the folder to share and then enable the checkbox.</span>
<span>要在Virt-Viewer（远程查看器）中共享文件夹，请转到</span><em><span>文件→首选项</span></em><span>。选择要共享的文件夹，然后启用该复选框。</span></p><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9YHhAIJFCExAsKUkE8IAFFPIDUIqhBRSDRBUqC%0ACimFFBCBpCWx02IaZ3G2SdyxPZ7vHh6+mcnSZnFjKIge6Wj8zYzvPf9z/me5d8TM+F8WfbkNuFx5%0ABcDLLf/fAEZGRmx4eNh6enqsp6fHhoeHbWRk5D9aFeSlVqHNmzfb6H33sHnT7ZQmD5GfOMax6Sm+%0APl5h1Yc+xpYtW2SBbX1ReUkRGBkZsdH77mHLW95EOv4Ms3ueJh6YYPHUFF9aljJ63z3cf//9/5FI%0AvKQIDA8P293L2yhVjjH7t51ocDiviFecF46n7XzBreChhx4qNhH5t0XjJUVgx44ddGUZ9b/vIpQD%0AoRQIWSDJAiFL6B9axo4dO4gxAmANWVDLG+Ln82URMRGhVCqRHxonlAPqFXWKC4r6IhI6OMjMzBN4%0A/4LlTUQQEZxzZ32QJAlpmrb+p16vU6vVOHXq1AWjN18AnDj0F971vrs4OnmYJVkoDA4FCPUO172I%0ACgnt7SV++4vvsGhRJx3tJbIsRVVpsUnOBBABBVFEClKYwbKr7sTM7EIUnBcA7z21k7t49x1X8JXv%0AbOWra7rw5QRtcN8PLCfvvZJvb9vJycpJpg4/hp/N0I4SMQs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Vg/a5+oHrU5zIznDhxk964xKpXKggAoTlWW8+OfPorlOQ//cjsDy1bS2dFO%0AW+diVly1iL6+Pqanpzl5qsL4pPHwN3/G1InDlMsZ7Z1tDA30cfWqIa5dexV9fb2YnT7UTxw4xsHJ%0Ao4yOjfOP8QOMjx/k4OQx7r777lY0zycXvJ02M4sxMjg4SL1eR0TYsGEDw8PD9PX10d7ejogUN3a1%0AGqpKCIE8z5mdnUVVqVarbN++nba2Nvbu3csDDzyAqrJ8+atb+zjn6e/vZ/Xq1axatYq1a9fS29tL%0AlmUMDQ1RKpXOm9EXvV6v1+tWr9eZnp5mZmaGWq1GjLHF62aiNZ+bnPfe45xrvTZzxMyYmZk56+LX%0AzKjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"></th><th><span>Folder sharing currently only works in the Linux version of Virt-Viewer. 文件夹共享目前仅在 Linux 版本的 Virt-Viewer 中有效。</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAKdUlEQVRoge1Ze1AV1x3+zt279wEi%0ADWCYGzRVktqa1MEmmtbWR22ncXxUrTDWV/5IqG2wUAUfmUwSkk6V+EAJCEQC6figwZBqZtRxqukf%0AtebRZBpFG1S0hiRErwiaKK977+6eX//YPXt37+UiIJlMZnpmdnb33PP4vt97z2VEhG9yc3zdAO60%0A/Z/A192+8QScX8Wifr+fWltbzffU1FT4fD72Vew15ASampqovr4eBw8eNPvGjRuHzMxMmj9//tCT%0AIKIhu958801yuVwEoNdr48aNNJT7EdHQEdi/fz/JshwTvLiKioqGlMSQLFJfX0+MMRvQsWNSqXLz%0AH2j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JoAYItG1mdr+hfvVlACtHDIXkploYXbHvQOikDEe6/ZmjFmAhf9ZvJxOk2Qol88W4kYz32S%0AGNQfHLG+TyMTkAVEr88xQfVnkBg7GAKixSIykDYQsL21/wFkW/B5QqT9lwAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Caution"></th><th><span>Experimental! Currently this feature does not work reliably. 实验的！目前，此功能无法可靠地运行。</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><h4 id='video-streaming-视频流'><span>Video Streaming 视频流</span></h4><p><span>Fast refreshing areas are encoded into a video stream. Two options exist:</span>
<span>快速刷新区域被编码到视频流中。存在两个选项：</span></p><ul><li><p><strong><span>all</span></strong><span>: Any fast refreshing area will be encoded into a video stream.</span>
<strong><span>all</span></strong><span>：任何快速刷新的区域都将被编码为视频流。</span></p></li><li><p><strong><span>filter</span></strong><span>: Additional filters are used to decide if video streaming should be used (currently only small window surfaces are skipped).</span>
<strong><span>filter</span></strong><span>：使用其他过滤器来决定是否应使用视频流（目前仅跳过小窗口表面）。</span></p></li></ul><p><span>A general recommendation if video streaming should be enabled and which option to choose from cannot be given. Your mileage may vary depending on the specific circumstances.</span>
<span>如果应启用视频流以及应从哪个选项中进行选择，则无法给出一般建议。您的里程可能会因具体情况而异。</span></p><h4 id='troubleshooting-故障-排除-2'><span>Troubleshooting 故障 排除</span></h4><p><span>Shared folder does not show up</span>
<span>共享文件夹不显示</span></p><p><span>Make sure the WebDAV service is enabled and running in the guest. On Windows it is called </span><em><span>Spice webdav proxy</span></em><span>. In Linux the name is </span><em><span>spice-webdavd</span></em><span> but can be different depending on the distribution.</span>
<span>确保 WebDAV 服务已启用并在客户机中运行。在 Windows 上，它被称为 </span><em><span>Spice webdav 代理</span></em><span>。在 Linux 中，名称是 </span><em><span>spice-webdavd，</span></em><span>但根据发行版的不同可能会有所不同。</span></p><p><span>If the service is running, check the WebDAV server by opening </span><a href='http://localhost:9843/'><span>http://localhost:9843</span></a><span> in a browser in the guest.</span>
<span>如果服务正在运行，请在客户机的浏览器中打开 </span><a href='http://localhost:9843/'><span>http://localhost:9843</span></a><span> 来检查 WebDAV 服务器。</span></p><p><span>It can help to restart the SPICE session.</span>
<span>重新启动SPICE会话会有所帮助。</span></p><h2 id='migration-迁移'><span>Migration 迁移</span></h2><p><a href='https://pve.proxmox.com/pve-docs/images/screenshot/gui-qemu-migrate.png'><img src="https://pve.proxmox.com/pve-docs/images/screenshot/gui-qemu-migrate.png" referrerpolicy="no-referrer" alt="screenshot/gui-qemu-migrate.png"></a></p><p><span>If you have a cluster, you can migrate your VM to another host with</span>
<span>如果有群集，则可以将 VM 迁移到另一台主机</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm migrate &lt;vmid&gt; &lt;target&gt;</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>There are generally two mechanisms for this</span>
<span>通常有两种机制可以做到这一点</span></p><ul><li><p><span>Online Migration (aka Live Migration)</span>
<span>联机迁移（又名实时迁移）</span></p></li><li><p><span>Offline Migration 脱机迁移</span></p></li></ul><h3 id='online-migration-在线迁移'><span>Online Migration 在线迁移 </span></h3><p><span>If your VM is running and no locally bound resources are configured (such as devices that are passed through), you can initiate a live migration with the --online flag in the qm migration command evocation. The web interface defaults to live migration when the VM is running.</span>
<span>如果您的 VM 正在运行，并且未配置本地绑定的资源（例如通过的设备），则可以在 qm 迁移命令调用中使用 --online 标志启动实时迁移。当 VM 运行时，Web 界面默认为实时迁移。</span></p><h4 id='how-it-works-运作方式'><span>How it works 运作方式</span></h4><p><span>Online migration first starts a new QEMU process on the target host with the </span><em><span>incoming</span></em><span> flag, which performs only basic initialization with the guest vCPUs still paused and then waits for the guest memory and device state data streams of the source Virtual Machine. All other resources, such as disks, are either shared or got already sent before runtime state migration of the VMs begins; so only the memory content and device state remain to be transferred.</span>
<span>联机迁移首先在目标主机上启动带有</span><em><span>传入</span></em><span>标志的新 QEMU 进程，该进程仅在客户机 vCPU 仍处于暂停状态的情况下执行基本初始化，然后等待源虚拟机的客户机内存和设备状态数据流。所有其他资源（如磁盘）要么是共享的，要么是在 VM 的运行时状态迁移开始之前已发送的;因此，只剩下内存内容和设备状态需要传输。</span></p><p><span>Once this connection is established, the source begins asynchronously sending the memory content to the target. If the guest memory on the source changes, those sections are marked dirty and another pass is made to send the guest memory data. This loop is repeated until the data difference between running source VM and incoming target VM is small enough to be sent in a few milliseconds, because then the source VM can be paused completely, without a user or program noticing the pause, so that the remaining data can be sent to the target, and then unpause the targets VM’s CPU to make it the new running VM in well under a second.</span>
<span>一旦建立此连接，源将开始异步将内存内容发送到目标。如果源上的客户机内存发生更改，则这些部分将被标记为脏，并进行另一次传递以发送客户机内存数据。重复此循环，直到正在运行的源 VM 和传入的目标 VM 之间的数据差异足够小，可以在几毫秒内发送，因为这样源 VM 可以完全暂停，而用户或程序不会注意到暂停，以便可以将剩余数据发送到目标，然后取消暂停目标 VM 的 CPU，使其在不到一秒的时间内成为新的正在运行的 VM。</span></p><h4 id='requirements-要求'><span>Requirements 要求</span></h4><p><span>For Live Migration to work, there are some things required:</span>
<span>要使实时迁移正常工作，需要满足以下条件：</span></p><ul><li><p><span>The VM has no local resources that cannot be migrated. For example, PCI or USB devices that are passed through currently block live-migration. Local Disks, on the other hand, can be migrated by sending them to the target just fine.</span>
<span>VM 没有无法迁移的本地资源。例如，通过的 PCI 或 USB 设备当前会阻止实时迁移。另一方面，可以通过将本地磁盘发送到目标来迁移本地磁盘。</span></p></li><li><p><span>The hosts are located in the same Proxmox VE cluster.</span>
<span>主机位于同一 Proxmox VE 集群中。</span></p></li><li><p><span>The hosts have a working (and reliable) network connection between them.</span>
<span>主机之间具有工作（且可靠）的网络连接。</span></p></li><li><p><span>The target host must have the same, or higher versions of the Proxmox VE packages. Although it can sometimes work the other way around, this cannot be guaranteed.</span>
<span>目标主机必须具有相同或更高版本的 Proxmox VE 软件包。尽管它有时可以反其道而行之，但这不能保证。</span></p></li><li><p><span>The hosts have CPUs from the same vendor with similar capabilities. Different vendor </span><strong><span>might</span></strong><span> work depending on the actual models and VMs CPU type configured, but it cannot be guaranteed - so please test before deploying such a setup in production.</span>
<span>主机具有来自同一供应商的 CPU，具有相似的功能。根据配置的实际型号和虚拟机的 CPU 类型，不同的供应商</span><strong><span>可能会</span></strong><span>工作，但无法保证 - 因此，请在生产中部署此类设置之前进行测试。</span></p></li></ul><h3 id='offline-migration-脱机迁移'><span>Offline Migration 脱机迁移 </span></h3><p><span>If you have local resources, you can still migrate your VMs offline as long as all disk are on storage defined on both hosts. Migration then copies the disks to the target host over the network, as with online migration. Note that any hardware passthrough configuration may need to be adapted to the device location on the target host.</span>
<span>如果您有本地资源，只要所有磁盘都位于两台主机上定义的存储上，您仍然可以脱机迁移 VM。然后，迁移会通过网络将磁盘复制到目标主机，这与联机迁移一样。请注意，任何硬件直通配置都可能需要根据目标主机上的设备位置进行调整。</span></p><h2 id='copies-and-clones-复制和克隆'><span>Copies and Clones 复制和克隆</span></h2><p><a href='https://pve.proxmox.com/pve-docs/images/screenshot/gui-qemu-full-clone.png'><img src="https://pve.proxmox.com/pve-docs/images/screenshot/gui-qemu-full-clone.png" referrerpolicy="no-referrer" alt="screenshot/gui-qemu-full-clone.png"></a></p><p><span>VM installation is usually done using an installation media (CD-ROM) from the operating system vendor. Depending on the OS, this can be a time consuming task one might want to avoid.</span>
<span>VM 安装通常使用操作系统供应商提供的安装介质 （CD-ROM） 完成。根据操作系统的不同，这可能是一项可能想要避免的耗时任务。</span></p><p><span>An easy way to deploy many VMs of the same type is to copy an existing VM. We use the term </span><em><span>clone</span></em><span> for such copies, and distinguish between </span><em><span>linked</span></em><span> and </span><em><span>full</span></em><span> clones.</span>
<span>部署许多相同类型的 VM 的一种简单方法是复制现有 VM。我们使用术语</span><em><span>“克隆</span></em><span>”来表示此类副本，并区分</span><em><span>链接</span></em><span>克隆和</span><em><span>完整</span></em><span>克隆。</span></p><ul><li><p><span>Full Clone 完整克隆</span></p><p><span>The result of such copy is an independent VM. The new VM does not share any storage resources with the original. 此类复制的结果是一个独立的 VM。新 VM 不与原始 VM 共享任何存储资源。It is possible to select a </span><strong><span>Target Storage</span></strong><span>, so one can use this to migrate a VM to a totally different storage. You can also change the disk image </span><strong><span>Format</span></strong><span> if the storage driver supports several formats. 可以选择</span><strong><span>目标存储</span></strong><span>，因此可以使用此功能将 VM 迁移到完全不同的存储。如果存储驱动程序支持多种格式，您还可以更改磁盘映像</span><strong><span>格式</span></strong><span>。</span><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUl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mZk56+LX%0AzKjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"><span>A full clone needs to read and copy all VM image data. This is usually much slower than creating a linked clone. 完整克隆需要读取和复制所有虚拟机映像数据。这通常比创建链接克隆慢得多。Some storage types allows to copy a specific </span><strong><span>Snapshot</span></strong><span>, which defaults to the </span><em><span>current</span></em><span> VM data. This also means that the final copy never includes any additional snapshots from the original VM. 某些存储类型允许复制特定 Snapshot，该 </span><strong><span>Snapshot</span></strong><span> 默认为</span><em><span>当前</span></em><span> VM 数据。这也意味着最终副本永远不会包含来自原始 VM 的任何其他快照。</span></p></li><li><p><span>Linked Clone 链接克隆</span></p><p><span>Modern storage drivers support a way to generate fast linked clones. Such a clone is a writable copy whose initial contents are the same as the original data. Creating a linked clone is nearly instantaneous, and initially consumes no additional space. 现代存储驱动程序支持一种生成快速链接克隆的方法。此类克隆是可写副本，其初始内容与原始数据相同。创建链接克隆几乎是瞬间完成的，最初不会占用额外的空间。They are called </span><em><span>linked</span></em><span> because the new image still refers to the original. Unmodified data blocks are read from the original image, but modification are written (and afterwards read) from a new location. This technique is called </span><em><span>Copy-on-write</span></em><span>. 它们之所以被称为</span><em><span>链接</span></em><span>，是因为新图像仍然引用原始图像。未修改的数据块是从原始图像中读取的，但修改是从新位置写入（以及随后读取）的。这种技术称为 </span><em><span>Copy-on-write</span></em><span>。This requires that the original volume is read-only. With Proxmox VE one can convert any VM into a read-only </span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_templates'><span>Template</span></a><span>). Such templates can later be used to create linked clones efficiently. 这要求原始卷是只读的。使用 Proxmox VE，可以将任何 VM 转换为只读</span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_templates'><span>模板</span></a><span>）。此类模板稍后可用于有效地创建链接克隆。</span><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1RKpXOm9EXvV6v1+tWr9eZnp5mZmaGWq1GjLHF62aiNZ+bnPfe45xrvTZzxMyYmZk56+LX%0AzKjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"><span>You cannot delete an original template while linked clones exist. 当链接克隆存在时，您无法删除原始模板。It is not possible to change the </span><strong><span>Target storage</span></strong><span> for linked clones, because this is a storage internal feature. 无法更改链接克隆的目标</span><strong><span>存储</span></strong><span>，因为这是存储内部功能。</span></p></li></ul><p><span>The </span><strong><span>Target node</span></strong><span> option allows you to create the new VM on a different node. The only restriction is that the VM is on shared storage, and that storage is also available on the target node.</span>
<span>使用</span><strong><span>“目标节点</span></strong><span>”选项可以在其他节点上创建新的 VM。唯一的限制是 VM 位于共享存储上，并且该存储在目标节点上也可用。</span></p><p><span>To avoid resource conflicts, all network interface MAC addresses get randomized, and we generate a new </span><em><span>UUID</span></em><span> for the VM BIOS (smbios1) setting.</span>
<span>为避免资源冲突，所有网络接口 MAC 地址都会随机化，并且我们为 VM BIOS （smbios1） 设置生成新的 </span><em><span>UUID</span></em><span>。</span></p><h2 id='virtual-machine-templates-虚拟机模板'><span>Virtual Machine Templates 虚拟机模板</span></h2><p><span>One can convert a VM into a Template. Such templates are read-only, and you can use them to create linked clones.</span>
<span>可以将 VM 转换为模板。此类模板是只读的，您可以使用它们来创建链接克隆。</span></p><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9YHhAIJFCExAsKUkE8IAFFPIDUIqhBRSDRBUqC%0ACimFFBCBpCWx02IaZ3G2SdyxPZ7vHh6+mcn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referrerpolicy="no-referrer" alt="Note"></th><th><span>It is not possible to start templates, because this would modify the disk images. If you want to change the template, create a linked clone and modify that. 无法启动模板，因为这会修改磁盘映像。如果要更改模板，请创建链接克隆并对其进行修改。</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><h2 id='vm-generation-id-vm-生成-id'><span>VM Generation ID VM 生成 ID</span></h2><p><span>Proxmox VE supports Virtual Machine Generation ID (</span><em><span>vmgenid</span></em><span>) [</span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnote_14'><span>14</span></a><span>] for virtual machines. This can be used by the guest operating system to detect any event resulting in a time shift event, for example, restoring a backup or a snapshot rollback.</span>
<span>Proxmox VE支持虚拟机生成ID （</span><em><span>vmgenid</span></em><span>） 14]。客户机操作系统可以使用它来检测导致时移事件的任何事件，例如，还原备份或快照回滚。</span></p><p><span>When creating new VMs, a </span><em><span>vmgenid</span></em><span> will be automatically generated and saved in its configuration file.</span>
<span>创建新虚拟机时，将自动生成 </span><em><span>vmgenid</span></em><span> 并将其保存在其配置文件中。</span></p><p><span>To create and add a </span><em><span>vmgenid</span></em><span> to an already existing VM one can pass the special value ‘1’ to let Proxmox VE autogenerate one or manually set the </span><em><span>UUID</span></em><span> [</span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnote_15'><span>15</span></a><span>] by using it as value, for example:</span>
<span>要创建</span><em><span>vmgenid</span></em><span>并将其添加到已经存在的VM中，可以传递特殊值“1”，让Proxmox VE自动生成一个，或者手动设置</span><em><span>UUID</span></em><span> 15]将其用作值，例如：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm set VMID -vmgenid 1</span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm set VMID -vmgenid 00000000-0000-0000-0000-000000000000</span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 52px;"></div><div class="CodeMirror-gutters" style="display: none; height: 52px;"></div></div></div></pre><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9YHhAIJFCExAsKUkE8IAFFPIDUIqhBRSDRBUqC%0ACimFFBCBpCWx02IaZ3G2SdyxPZ7vHh6+mcnSZnFjKIge6Wj8zYzvPf9z/me5d8TM+F8WfbkNuFx5%0ABcDLLf/fAEZGRmx4eNh6enqsp6fHhoeHbWRk5D9aFeSlVqHNmzfb6H33sHnT7ZQmD5GfOMax6Sm+%0APl5h1Yc+xpYtW2SBbX1ReUk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I%0A4lTHmTVePKgWzpDGJGpc8CDTlEsuo88++wxXDA0UIUbAOP23KGZKjI48KnkuhcbiPbPCOBoeBikO%0ALk2VxjqNRilaAEqSZGEAbN261bZt+zW33XY7IAXXm6Ou0YhIMamaaUOl5WRrzg00viuKWWxpQUOH%0ANAZFQRpD48Xlkig0MTHBB95zG+VSylz1KCbWyDOh2XyK+56IqjWMKigkUnzWnPPFFFRRLZ29SQRU%0AELOGY4pZ6LKOlM07mZ07d/KOtw1TcB4sGkTDiDQ9K1IkrKeYmQC08d7pZLSiRBpE5s7aS0XAHFEK%0AAGY51Wr18g80Zmb33nsvX/z8XdSmj2AWOXhwkrxe46+79jB55Dh/3T2GxUhHextdXW2sXN7PNWtW%0AIQKDA71FFBoAjIgQkVg/a5+oHrU5zIznDhxk964xKpXKggAoTlWW8+OfPorlOQ//cjsDy1bS2dFO%0AW+diVly1iL6+Pqanpzl5qsL4pPHwN3/G1InDlMsZ7Z1tDA30cfWqIa5dexV9fb2YnT7UTxw4xsHJ%0Ao4yOjfOP8QOMjx/k4OQx7r777lY0zycXvJ02M4sxMjg4SL1eR0TYsGEDw8PD9PX10d7ejogUN3a1%0AGqpKCIE8z5mdnUVVqVarbN++nba2Nvbu3csDDzyAqrJ8+atb+zjn6e/vZ/Xq1axatYq1a9fS29tL%0AlmUMDQ1RKpXOm9EXvV6v1+tWr9eZnp5mZmaGWq1GjLHF62aiNZ+bnPfe45xrvTZzxMyYmZk56+LX%0AzKjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"></th><th><span>The initial addition of a </span><em><span>vmgenid</span></em><span> device to an existing VM, may result in the same effects as a change on snapshot rollback, backup restore, etc., has as the VM can interpret this as generation change. 将 </span><em><span>vmgenid</span></em><span> 设备初始添加到现有 VM 可能会导致与快照回滚、备份还原等更改相同的效果，因为 VM 可以将其解释为生成更改。</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><p><span>In the rare case the </span><em><span>vmgenid</span></em><span> mechanism is not wanted one can pass ‘0’ for its value on VM creation, or retroactively delete the property in the configuration with:</span>
<span>在极少数情况下，不需要 </span><em><span>vmgenid</span></em><span> 机制，可以在创建 VM 时传递其值为“0”，或者使用以下命令追溯删除配置中的属性：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm set VMID -delete vmgenid</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>The most prominent use case for </span><em><span>vmgenid</span></em><span> are newer Microsoft Windows operating systems, which use it to avoid problems in time sensitive or replicate services (such as databases or domain controller [</span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnote_16'><span>16</span></a><span>]) on snapshot rollback, backup restore or a whole VM clone operation.</span>
<em><span>vmgenid</span></em><span> 最突出的用例是较新的 Microsoft Windows 操作系统，它们使用它来避免时间敏感或复制服务（如数据库或域控制器16]） 在快照回滚、备份还原或整个虚拟机克隆操作时。</span></p><h2 id='importing-virtual-machines-导入虚拟机'><span>Importing Virtual Machines 导入虚拟机</span></h2><p><span>Importing existing virtual machines from foreign hypervisors or other Proxmox VE clusters can be achieved through various methods, the most common ones are:</span>
<span>从外部虚拟机管理程序或其他 Proxmox VE 集群导入现有虚拟机可以通过各种方法实现，最常见的有：</span></p><ul><li><p><span>Using the native import wizard, which utilizes the </span><em><span>import</span></em><span> content type, such as provided by the ESXi special storage.</span>
<span>使用本机导入向导，该向导利用</span><em><span>导入</span></em><span>内容类型，例如由 ESXi 特殊存储提供。</span></p></li><li><p><span>Performing a backup on the source and then restoring on the target. This method works best when migrating from another Proxmox VE instance.</span>
<span>在源上执行备份，然后在目标上还原。从另一个 Proxmox VE 实例迁移时，此方法效果最佳。</span></p></li><li><p><span>using the OVF-specific import command of the qm command-line tool.</span>
<span>使用 qm 命令行工具的特定于 OVF 的导入命令。</span></p></li></ul><p><span>If you import VMs to Proxmox VE from other hypervisors, it’s recommended to familiarize yourself with the </span><a href='https://pve.proxmox.com/wiki/Migrate_to_Proxmox_VE#Concepts'><span>concepts of Proxmox VE</span></a><span>.</span>
<span>如果从其他虚拟机管理程序将虚拟机导入 Proxmox VE，建议熟悉 </span><a href='https://pve.proxmox.com/wiki/Migrate_to_Proxmox_VE#Concepts'><span>Proxmox VE 的概念</span></a><span>。</span></p><h3 id='import-wizard-导入向导'><span>Import Wizard 导入向导 </span></h3><p><a href='https://pve.proxmox.com/pve-docs/images/screenshot/gui-import-wizard-general.png'><img src="https://pve.proxmox.com/pve-docs/images/screenshot/gui-import-wizard-general.png" referrerpolicy="no-referrer" alt="screenshot/gui-import-wizard-general.png"></a></p><p><span>Proxmox VE provides an integrated VM importer using the storage plugin system for native integration into the API and web-based user interface. You can use this to import the VM as a whole, with most of its config mapped to Proxmox VE’s config model and reduced downtime.</span>
<span>Proxmox VE提供了一个集成的VM导入器，使用存储插件系统将本机集成到API和基于Web的用户界面中。您可以使用它来导入 VM 作为一个整体，其大部分配置映射到 Proxmox VE 的配置模型并减少停机时间。</span></p><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9YHhAIJFCExAsKUkE8IAFFPIDUIqhBRSDRBUqC%0ACimFFBCBpCWx02IaZ3G2SdyxPZ7vHh6+mcnSZnFjKIge6Wj8zYzvPf9z/me5d8TM+F8WfbkNuFx5%0ABcDLLf/fAEZGRmx4eNh6enqsp6fHhoeHbWRk5D9aFeSlVqHNmzfb6H33sHnT7ZQmD5GfOMax6Sm+%0APl5h1Yc+xpYtW2SBbX1ReUkRGBkZsdH77mHLW95EOv4Ms3ueJh6YYPHUFF9aljJ63z3cf//9/5FI%0AvKQIDA8P293L2yhVjjH7t51ocDiviFecF46n7XzBreChhx4qNhH5t0XjJUVgx44ddGUZ9b/vIpQD%0AoRQIWSDJAiFL6B9axo4dO4gxAmANWVDLG+Ln82URMRGhVCqRHxonlAPqFXWKC4r6IhI6OMjMzBN4%0A/4LlTUQQEZxzZ32QJAlpmrb+p16vU6vVOHXq1AWjN18AnDj0F971vrs4OnmYJVkoDA4FCPUO172I%0ACgnt7SV++4vvsGhRJx3tJbIsRVVpsUnOBBABBVFEClKYwbKr7sTM7EIUnBcA7z21k7t49x1X8JXv%0AbOWra7rw5QRtcN8PLCfvvZJ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NWtW%0AIQKDA71FFBoAjIgQkVg/a5+oHrU5zIznDhxk964xKpXKggAoTlWW8+OfPorlOQ//cjsDy1bS2dFO%0AW+diVly1iL6+Pqanpzl5qsL4pPHwN3/G1InDlMsZ7Z1tDA30cfWqIa5dexV9fb2YnT7UTxw4xsHJ%0Ao4yOjfOP8QOMjx/k4OQx7r777lY0zycXvJ02M4sxMjg4SL1eR0TYsGEDw8PD9PX10d7ejogUN3a1%0AGqpKCIE8z5mdnUVVqVarbN++nba2Nvbu3csDDzyAqrJ8+atb+zjn6e/vZ/Xq1axatYq1a9fS29tL%0AlmUMDQ1RKpXOm9EXvV6v1+tWr9eZnp5mZmaGWq1GjLHF62aiNZ+bnPfe45xrvTZzxMyYmZk56+LX%0AzKjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"></th><th><span>The import wizard was added during the Proxmox VE 8.2 development cycle and is in tech preview state. While it’s already promising and working stable, it’s still under active development, focusing on adding other import-sources, like for example OVF/OVA files, in the future. 导入向导是在 Proxmox VE 8.2 开发周期中添加的，处于技术预览状态。虽然它已经很有前途并且运行稳定，但它仍在积极开发中，重点是在未来添加其他导入源，例如 OVF/OVA 文件。</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><p><span>To use the import wizard you have to first set up a new storage for an import source, you can do so on the web-interface under </span><em><span>Datacenter → Storage → Add</span></em><span>.</span>
<span>要使用导入向导，您必须首先为导入源设置新的存储，您可以在 Web 界面的 </span><em><span>Datacenter → Storage → Add</span></em><span> 下执行此操作。</span></p><p><span>Then you can select the new storage in the resource tree and use the </span><em><span>Virtual Guests</span></em><span> content tab to see all available guests that can be imported.</span>
<span>然后，您可以在资源树中选择新的存储，并使用</span><em><span>“虚拟访客</span></em><span>内容”选项卡查看可以导入的所有可用访客。</span></p><p><a href='https://pve.proxmox.com/pve-docs/images/screenshot/gui-import-wizard-advanced.png'><img src="https://pve.proxmox.com/pve-docs/images/screenshot/gui-import-wizard-advanced.png" referrerpolicy="no-referrer" alt="screenshot/gui-import-wizard-advanced.png"></a></p><p><span>Select one and use the </span><em><span>Import</span></em><span> button (or double-click) to open the import wizard. You can modify a subset of the available options here and then start the import. Please note that you can do more advanced modifications after the import finished.</span>
<span>选择一个，然后使用</span><em><span>“导入</span></em><span>”按钮（或双击）打开导入向导。您可以在此处修改可用选项的子集，然后开始导入。请注意，在导入完成后，您可以进行更高级的修改。</span></p><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAKZUlEQVRoge2aa3BU5RmAn3Pbs7fs%0AJmwCRGITk0hVLFAtNWoq6pAiU0cKaYfa6ShT+YN4YbQw9F/8QX+UMv6gM3Q6oxMV6TgIbe10Gq2g%0AcSzDpRaFgmIk4SKB3LP3Pff+SM66m+xuFvEyzvSbeefsbva8+z7nvXzf934RHMfhmzzEr9uAqx3/%0AB/i6xzceQP6iFDmT1cBxHNzCkFsgBEHIXnNeC1f7u1cN4DiOY9s2rliWhWVZWRDHcbJGC4KAJElI%0AkoQoioii6IiieFUgnxvAtm3HNdg0Tbq6uuju7ubYsWP09vYyMjKCpmmoqkokEqGhoYGFCxfS2tpK%0AW1sbiqJkRZIkZxLoikGEK50H3CdumiZ9fX3s3LmT3bt3U1V3A0033cKc2nkEQxV4PSqSJOI4Dpqu%0Ak0gkGLx8kZ4T7zF87iSrV69m3bp1NDY2oqoqHo8HWZa5Uo9cEYBt245lWRiGQUdHB9u2beOe1Y8w%0A/6bFVAT9xJJpYvEUiVSGjG5gmBY4DqIoonoUfF4PoYAfRRE5/8kp3njlD6xfv54tW7YQCATw+Xyu%0AR8r2RtkAtm07pmly5MgRHn/8cZSaZpbcfjd+n5f+wVEGRqJkdC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CCeFWVd499jGGaWX1zq8OfrYOKeC+T%0AijM+cBHHsRju/Q9r164lFAoRDAbdPfEVAQiiKOLxeAgEAmzdupW/v/A7RLPEyjTHuGjKYMfLb3B5%0AeBzdMNl/+CSmZReN+0wqztDFs4iSxIE9O9mwYQPhcJhwOEwgEMhN4GkEZXUlYrEYe/bs4elfbWLF%0AQ5tQKyJlVaRy+kSJ6AhjA58iihJdf9rBUxufYPny5cyZM6esrkTJxpabzIFAgFWrVmHbNps3b+bu%0An6wnVF2H4lHLmlULgZiGTmxkgGR8DNu2efOV3/PUxo20tbURiUSorKwkEAhkk7fYmLE36rZX0uk0%0A0WiUgwcP0tHRQcW8G5ndsIBgaBYe1TvtyRYDMXWNZGyU+Ngwkiwz+GkfQ73vsWHDBhYvXkwkEmHW%0ArFmEw2G3M1eyR1pWczcXIh6PMz4+zvbt2+ns7OS2+x6kanYdqjeA1xdAUb3IioIoSjg42JaJaejo%0AmTRaOoGeTiHJEvGxYd55rZP29nbWrl1LOBymqqqKyspKKioqyjK+bIBcCE3TSCaTxGIxenp62LVr%0AF11dXdTUL2BO/Xx8/goEUcSxbYSJ2EGS5IlzgnSC/r4PuXzmOEuXLmXlypXU19cTCoUIh8OEQqEr%0A7k5/7vOBdDpNMpkkkUiQSCTo7u7m6NGjnD59mv7+fqLRKIZhoCgKoVCI2tpampqaWLRoES0tLfh8%0APvx+P8FgkGAw+OWfD7gj94RG13U0TSOdTpNOp8lMbmQ0TcvbArrrK1mW8Xg8eL3e7BLB5/N9dSc0%0AuSP3jMwwjKy4G3AXwB0ugAsx5YzMndW//DOy3OFMjGwrxrKs7NX9LBfAneFFUcxec6rU5zqpvCqA%0AqTCT16/0nPgLA/i6xjf+Xw3+B2ll/uiqTaJTAAAAAElFTkSuQmCC" referrerpolicy="no-referrer" alt="Tip"></th><th><span>The import wizard is currently (2024-03) available for ESXi and has been tested with ESXi versions 6.5 through 8.0. Note that guests using vSAN storage cannot be directly imported directly; their disks must first be moved to another storage. While it is possible to use a vCenter as the import source, performance is dramatically degraded (5 to 10 times slower). 导入向导目前 （2024-03） 可用于 ESXi，并已在 ESXi 版本 6.5 到 8.0 中进行了测试。请注意，使用 vSAN 存储的客户机不能直接导入;必须首先将其磁盘移动到另一个存储。虽然可以使用 vCenter 作为导入源，但性能会急剧下降（速度慢 5 到 10 倍）。</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><p><span>For a step-by-step guide and tips for how to adapt the virtual guest to the new hyper-visor see our </span><a href='https://pve.proxmox.com/wiki/Migrate_to_Proxmox_VE#Migration'><span>migrate to Proxmox VE wiki article</span></a><span>.</span>
<span>有关如何使虚拟客户机适应新的超级管理程序的分步指南和提示，请参阅我们的</span><a href='https://pve.proxmox.com/wiki/Migrate_to_Proxmox_VE#Migration'><span>迁移到 Proxmox VE 维基文章</span></a><span>。</span></p><h3 id='import-ovfova-through-cli-通过-cli-导入-ovfova'><span>Import OVF/OVA Through CLI 通过 CLI 导入 OVF/OVA </span></h3><p><span>A VM export from a foreign hypervisor takes usually the form of one or more disk images, with a configuration file describing the settings of the VM (RAM, number of cores).</span>
<span>从外部虚拟机管理程序导出的 VM 通常采用一个或多个磁盘的形式 图像，其中包含描述 VM 设置的配置文件（RAM、 核心数）。</span>
<span>The disk images can be in the vmdk format, if the disks come from VMware or VirtualBox, or qcow2 if the disks come from a KVM hypervisor. The most popular configuration format for VM exports is the OVF standard, but in practice interoperation is limited because many settings are not implemented in the standard itself, and hypervisors export the supplementary information in non-standard extensions.</span>
<span>如果磁盘来自 VMware 或 VirtualBox，如果磁盘来自 KVM 虚拟机管理程序，则为 qcow2。 VM 导出最流行的配置格式是 OVF 标准，但在 实践互操作是有限的，因为许多设置没有在 标准本身，虚拟机管理程序导出补充信息 在非标准扩展中。</span></p><p><span>Besides the problem of format, importing disk images from other hypervisors may fail if the emulated hardware changes too much from one hypervisor to another. Windows VMs are particularly concerned by this, as the OS is very picky about any changes of hardware. This problem may be solved by installing the MergeIDE.zip utility available from the Internet before exporting and choosing a hard disk type of </span><strong><span>IDE</span></strong><span> before booting the imported Windows VM.</span>
<span>除了格式问题之外，如果模拟的硬件从一个虚拟机管理程序到另一个虚拟机管理程序的变化太大，则从其他虚拟机管理程序导入磁盘映像可能会失败。Windows VM 对此特别关注，因为操作系统对硬件的任何更改都非常挑剔。通过在导出之前安装 Internet 上提供的 MergeIDE.zip 实用程序，并在启动导入的 Windows VM 之前选择硬盘类型的 </span><strong><span>IDE</span></strong><span>，可以解决此问题。</span></p><p><span>Finally there is the question of paravirtualized drivers, which improve the speed of the emulated system and are specific to the hypervisor. GNU/Linux and other free Unix OSes have all the necessary drivers installed by default and you can switch to the paravirtualized drivers right after importing the VM. For Windows VMs, you need to install the Windows paravirtualized drivers by yourself.</span>
<span>最后，还有一个半虚拟化驱动程序的问题，它提高了模拟系统的速度，并且特定于虚拟机管理程序。默认情况下，GNU/Linux 和其他免费的 Unix 操作系统已安装所有必要的驱动程序，您可以在导入 VM 后立即切换到半虚拟化驱动程序。对于 Windows VM，您需要自行安装 Windows 半虚拟化驱动程序。</span></p><p><span>GNU/Linux and other free Unix can usually be imported without hassle. Note that we cannot guarantee a successful import/export of Windows VMs in all cases due to the problems above.</span>
<span>GNU/Linux 和其他免费的 Unix 通常可以毫不费力地导入。请注意，由于上述问题，我们无法保证在所有情况下都能成功导入/导出 Windows VM。</span></p><h4 id='step-by-step-example-of-a-windows-ovf-import-windows-ovf-导入的分步示例'><span>Step-by-step example of a Windows OVF import Windows OVF 导入的分步示例</span></h4><p><span>Microsoft provides </span><a href='https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/'><span>Virtual Machines downloads</span></a><span> to get started with Windows development.We are going to use one of these to demonstrate the OVF import feature.</span>
<span>Microsoft 提供</span><a href='https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/'><span>虚拟机下载</span></a><span>以开始进行 Windows 开发。我们将使用其中一个来演示 OVF 导入功能。</span></p><h5 id='download-the-virtual-machine-zip-下载虚拟机压缩包'><span>Download the Virtual Machine zip 下载虚拟机压缩包</span></h5><p><span>After getting informed about the user agreement, choose the </span><em><span>Windows 10 Enterprise (Evaluation - Build)</span></em><span> for the VMware platform, and download the zip.</span>
<span>在了解用户协议后，选择适用于 VMware 平台的 </span><em><span>Windows 10 企业版（评估 - 内部版本），</span></em><span>然后下载 zip。</span></p><h5 id='extract-the-disk-image-from-the-zip-从-zip-中提取磁盘映像'><span>Extract the disk image from the zip 从 zip 中提取磁盘映像</span></h5><p><span>Using the unzip utility or any archiver of your choice, unpack the zip, and copy via ssh/scp the ovf and vmdk files to your Proxmox VE host.</span>
<span>使用解压缩工具或您选择的任何存档器，解压缩压缩文件，并通过 ssh/scp 将 ovf 和 vmdk 文件复制到您的 Proxmox VE 主机。</span></p><h5 id='import-the-virtual-machine-导入虚拟机'><span>Import the Virtual Machine 导入虚拟机</span></h5><p><span>This will create a new virtual machine, using cores, memory and VM name as read from the OVF manifest, and import the disks to the local-lvm storage. You have to configure the network manually.</span>
<span>这将使用从 OVF 清单中读取的核心、内存和虚拟机名称创建一个新的虚拟机，并将磁盘导入到本地 lvm 存储。您必须手动配置网络。</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm importovf 999 WinDev1709Eval.ovf local-lvm</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>The VM is ready to be started.</span>
<span>VM 已准备好启动。</span></p><h5 id='adding-an-external-disk-image-to-a-virtual-machine-将外部磁盘映像添加到虚拟机'><span>Adding an external disk image to a Virtual Machine 将外部磁盘映像添加到虚拟机</span></h5><p><span>You can also add an existing disk image to a VM, either coming from a foreign hypervisor, or one that you created yourself.</span>
<span>您还可以将现有磁盘映像添加到 VM，该映像可以来自外部虚拟机管理程序，也可以是您自己创建的虚拟机管理程序。</span></p><p><span>Suppose you created a Debian/Ubuntu disk image with the </span><em><span>vmdebootstrap</span></em><span> tool:</span>
<span>假设您使用 </span><em><span>vmdebootstrap</span></em><span> 工具创建了一个 Debian/Ubuntu 磁盘映像：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation" style=""><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">vmdebootstrap --verbose \</span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> --size 10GiB --serial-console \</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> --grub --no-extlinux \</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> --package openssh-server \</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> --package avahi-daemon \</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> --package qemu-guest-agent \</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> --hostname vm600 --enable-dhcp \</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> --customize=./copy_pub_ssh.sh \</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> --sparse --image vm600.raw</span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 234px;"></div><div class="CodeMirror-gutters" style="display: none; height: 234px;"></div></div></div></pre><p><span>You can now create a new target VM, importing the image to the storage pvedir and attaching it to the VM’s SCSI controller:</span>
<span>现在，您可以创建新的目标 VM，将映像导入存储 pvedir 并将其附加到 VM 的 SCSI 控制器：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm create 600 --net0 virtio,bridge=vmbr0 --name vm600 --serial0 socket \</span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> &nbsp; --boot order=scsi0 --scsihw virtio-scsi-pci --ostype l26 \</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> &nbsp; --scsi0 pvedir:0,import-from=/path/to/dir/vm600.raw</span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 104px;"></div><div class="CodeMirror-gutters" style="display: none; height: 104px;"></div></div></div></pre><p><span>The VM is ready to be started.</span>
<span>VM 已准备好启动。</span></p><h2 id='cloud-init-support-cloud-init-支持'><span>Cloud-Init Support Cloud-Init 支持</span></h2><p><a href='https://cloudinit.readthedocs.io/'><span>Cloud-Init</span></a><span> is the de facto multi-distribution package that handles early initialization of a virtual machine instance. Using Cloud-Init, configuration of network devices and ssh keys on the hypervisor side is possible. When the VM starts for the first time, the Cloud-Init software inside the VM will apply those settings.</span>
<a href='https://cloudinit.readthedocs.io/'><span>Cloud-Init</span></a><span> 是事实上的多分发包，用于处理虚拟机实例的早期初始化。使用 Cloud-Init，可以在虚拟机管理程序端配置网络设备和 ssh 密钥。当 VM 首次启动时，VM 内的 Cloud-Init 软件将应用这些设置。</span></p><p><span>Many Linux distributions provide ready-to-use Cloud-Init images, mostly designed for </span><em><span>OpenStack</span></em><span>. These images will also work with Proxmox VE. While it may seem convenient to get such ready-to-use images, we usually recommended to prepare the images by yourself. The advantage is that you will know exactly what you have installed, and this helps you later to easily customize the image for your needs.</span>
<span>许多 Linux 发行版都提供现成的 Cloud-Init 镜像，这些镜像大多是为 </span><em><span>OpenStack</span></em><span> 设计的。这些图像也将与Proxmox VE一起使用。虽然获取此类现成的图像似乎很方便，但我们通常建议自己准备图像。优点是您将确切地知道已安装的内容，这有助于您以后轻松自定义图像以满足您的需求。</span></p><p><span>Once you have created such a Cloud-Init image we recommend to convert it into a VM template. From a VM template you can quickly create linked clones, so this is a fast method to roll out new VM instances. You just need to configure the network (and maybe the ssh keys) before you start the new VM.</span>
<span>创建此类 Cloud-Init 镜像后，建议将其转换为 VM 模板。从 VM 模板中，您可以快速创建链接克隆，因此这是推出新 VM 实例的快速方法。您只需在启动新 VM 之前配置网络（可能还有 ssh 密钥）。</span></p><p><span>We recommend using SSH key-based authentication to login to the VMs provisioned by Cloud-Init. It is also possible to set a password, but this is not as safe as using SSH key-based authentication because Proxmox VE needs to store an encrypted version of that password inside the Cloud-Init data.</span>
<span>建议使用基于 SSH 密钥的身份验证登录到 Cloud-Init 预配的 VM。也可以设置密码，但这不如使用基于SSH密钥的身份验证安全，因为Proxmox VE需要在Cloud-Init数据中存储该密码的加密版本。</span></p><p><span>Proxmox VE generates an ISO image to pass the Cloud-Init data to the VM. For that purpose, all Cloud-Init VMs need to have an assigned CD-ROM drive. Usually, a serial console should be added and used as a display. Many Cloud-Init images rely on this, it is a requirement for OpenStack. However, other images might have problems with this configuration. Switch back to the default display configuration if using a serial console doesn’t work.</span>
<span>Proxmox VE 生成一个 ISO 镜像，用于将 Cloud-Init 数据传递给 VM。为此，所有 Cloud-Init VM 都需要有一个分配的 CD-ROM 驱动器。通常，应添加串行控制台并将其用作显示器。许多 Cloud-Init 镜像都依赖于此，这是 OpenStack 的要求。但是，其他映像可能对此配置有问题。如果使用串行控制台不起作用，请切换回默认显示配置。</span></p><h3 id='preparing-cloud-init-templates-准备-cloud-init-模板'><span>Preparing Cloud-Init Templates 准备 Cloud-Init 模板 </span></h3><p><span>The first step is to prepare your VM. Basically you can use any VM. Simply install the Cloud-Init packages </span><strong><span>inside the VM</span></strong><span> that you want to prepare. On Debian/Ubuntu based systems this is as simple as:</span>
<span>第一步是准备 VM。基本上，您可以使用任何虚拟机。只需在要准备的 </span><strong><span>VM 中</span></strong><span>安装 Cloud-Init 包即可。在基于 Debian/Ubuntu 的系统上，这就像以下几点一样简单：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">apt-get install cloud-init</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAMVUlEQVRogdWZeXDVVZbHP7/f27JB%0AwtJIiCERRFlbx5FuHRrRBgtBsRIwCCOrFmGmiDBjYVNlQlgiQjU6IjI4xLJxGf5QGp0Cbaftsu3R%0Ahu6aYXqgLZoWEsjyyDP7S972e7/l3vnj5cW3Ji9M/zOn6lRS997fvd/vueece+59ipSS/89iv5mP%0AZEQQQsS23RQARVEAUFUVRVFQog0ZyogJSClld3c327Ztw7IsLMuKto90KgBsNhtVVVXMnj2bvLw8%0A7Ha7HBEJKWXGKoSQXV1dcsuWLfLSpUsyKkKIIdWyrLTqdrvlU089Jc+cOSM9Ho8Mh8NSCCEzxTRi%0A8JWVlbKtre0vAt6yLGmapmxtbZXr1q2TZ86ckW1tbSMikTH4GzduyKqqqkHwsSA1TZOhUChOg8Hg%0AoBqGIQ3DSAk+VleuXDliEspwviullD09PbzwwgscO3Yszt91XScQCNDZ2YlhGIPfuFwu7Pb48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paTEpJa2sr5zZupOkmSaQqk2csWcLyTz4BQNO0uL7GxkbWr1+fErzNZlMG%0Aw1lVVSUvL4+SkhL27dvH8uXL8Xg8ceABiouLue+ttyieN2+IK2Z6TRx/5+LFacE3NDRQWVmZFjwk%0AnAOxJF566SW2bNnChQsXkmKipKSEB959l9vmzcvo1pZOpz/8ME98+mla8Bs2bGDZsmVpwUOa5/VE%0Ad0oXE319fXxWXs43Z88m9Q0n03/0I1YPJIRE8OfOnWPHjh2UlZUNCT4tgUQSO3fupKqqigceeGCw%0AP/a7VM8emUg0VcbK+fPn2bp1KytWrBgW/JAEEknU1NTw7LPPMn/+/GFBZQI8lZw/f57nnnuO5cuX%0AM2XKlGHBD0sgkURdXR2PP/44FRUVNwV+qP7Tp09z8ODBjNxmRAQSSRw4cIBly5axdOnSvwh4RVH4%0A4osv2L9/P2VlZRlbfkQEEkls376djo4OQqHE83bk4nK5EEKwZs0aSktLRwR+RATgOxItLS1cu3aN%0Avr6+wTfK/4tEfzeeMmUKkydPzhg8jJAAREgEg0H6+vrQNC2pFL8ZUVWVrKws8vPzycnJQVXVjH/s%0A/F/lgJiyQFHragAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Warning"></th><th><span>This command is </span><strong><span>not</span></strong><span> intended to be executed on the Proxmox VE host, but only inside the VM. 此命令</span><strong><span>不应</span></strong><span>在 Proxmox VE 主机上执行，而只能在 VM 内部执行。</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><p><span>Already many distributions provide ready-to-use Cloud-Init images (provided as .qcow2 files), so alternatively you can simply download and import such images. For the following example, we will use the cloud image provided by Ubuntu at </span><a href='https://cloud-images.ubuntu.com/'><span>https://cloud-images.ubuntu.com</span></a><span>.</span>
<span>已经有许多发行版提供了现成的 Cloud-Init 镜像（以 .qcow2 文件的形式提供），因此您可以简单地下载和导入此类镜像。在以下示例中，我们将使用 </span><a href='https://cloud-images.ubuntu.com/'><span>Ubuntu 在 https://cloud-images.ubuntu.com</span></a><span> 时提供的云镜像。</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation" style=""><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># download the image</span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">wget https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text="" cm-zwsp="">
</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># create a new VM with VirtIO SCSI controller</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">qm create 9000 --memory 2048 --net0 virtio,bridge=vmbr0 --scsihw virtio-scsi-pci</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text="" cm-zwsp="">
</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># import the downloaded disk to the local-lvm storage, attaching it as a SCSI drive</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">qm set 9000 --scsi0 local-lvm:0,import-from=/path/to/bionic-server-cloudimg-amd64.img</span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 312px;"></div><div class="CodeMirror-gutters" style="display: none; height: 312px;"></div></div></div></pre><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9YHhAIJFCExAsKUkE8IAFFPIDUIqhBRSDRBUqC%0ACimFFBCBpCWx02IaZ3G2SdyxPZ7vHh6+mcnSZnFjKIge6Wj8zYzvPf9z/me5d8TM+F8WfbkNuFx5%0ABcDLLf/fAEZGRmx4eNh6enqsp6fHhoeHbWRk5D9aFeSlVqHNmzfb6H33sHnT7ZQmD5GfOMax6Sm+%0APl5h1Yc+xpYtW2SBbX1ReUkRGBkZsdH77mHLW95EOv4Ms3ueJh6YYPHUFF9aljJ63z3cf//9/5FI%0AvKQIDA8P293L2yhVjjH7t51ocDiviFecF46n7XzBreChhx4qNhH5t0XjJUVgx44ddGUZ9b/vIpQD%0AoRQIWSDJAiFL6B9axo4dO4gxAmANWVDLG+Ln82URMRGhVCqRHxonlAPqFXWKC4r6IhI6OMjMzBN4%0A/4LlTUQQEZxzZ32QJAlpmrb+p16vU6vVOHXq1AWjN18AnDj0F971vrs4OnmYJVkoDA4FCPUO172I%0ACgnt7SV++4vvsGhRJx3tJbIsRVVpsUnOBBABBVFECl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80Zmb33nsvX/z8XdSmj2AWOXhwkrxe46+79jB55Dh/3T2GxUhHextdXW2sXN7PNWtW%0AIQKDA71FFBoAjIgQkVg/a5+oHrU5zIznDhxk964xKpXKggAoTlWW8+OfPorlOQ//cjsDy1bS2dFO%0AW+diVly1iL6+Pqanpzl5qsL4pPHwN3/G1InDlMsZ7Z1tDA30cfWqIa5dexV9fb2YnT7UTxw4xsHJ%0Ao4yOjfOP8QOMjx/k4OQx7r777lY0zycXvJ02M4sxMjg4SL1eR0TYsGEDw8PD9PX10d7ejogUN3a1%0AGqpKCIE8z5mdnUVVqVarbN++nba2Nvbu3csDDzyAqrJ8+atb+zjn6e/vZ/Xq1axatYq1a9fS29tL%0AlmUMDQ1RKpXOm9EXvV6v1+tWr9eZnp5mZmaGWq1GjLHF62aiNZ+bnPfe45xrvTZzxMyYmZk56+LX%0AzKjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"></th><th><span>Ubuntu Cloud-Init images require the virtio-scsi-pci controller type for SCSI drives. Ubuntu Cloud-Init 镜像需要 SCSI 驱动器的 virtio-scsi-pci 控制器类型。</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><p><a href='https://pve.proxmox.com/pve-docs/images/screenshot/gui-cloudinit-hardware.png'><img src="https://pve.proxmox.com/pve-docs/images/screenshot/gui-cloudinit-hardware.png" referrerpolicy="no-referrer" alt="screenshot/gui-cloudinit-hardware.png"></a></p><p><span>Add Cloud-Init CD-ROM drive</span>
<span>添加 Cloud-Init CD-ROM 驱动器</span></p><p><span>The next step is to configure a CD-ROM drive, which will be used to pass the Cloud-Init data to the VM.</span>
<span>下一步是配置 CD-ROM 驱动器，该驱动器将用于将 Cloud-Init 数据传递到 VM。</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">qm set 9000 --ide2 local-lvm:cloudinit</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>To be able to boot directly from the Cloud-Init image, set the boot parameter to order=scsi0 to restrict BIOS to boot from this disk only. This will speed up booting, because VM BIOS skips the testing for a bootable CD-ROM.</span>
<span>为了能够直接从 Cloud-Init 映像启动，请将启动参数设置为 order=scsi0，以限制 BIOS 仅从此磁盘启动。这将加快启动速度，因为 VM BIOS 会跳过可启动 CD-ROM 的测试。</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">qm set 9000 --boot order=scsi0</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>For many Cloud-Init images, it is required to configure a serial console and use it as a display. If the configuration doesn’t work for a given image however, switch back to the default display instead.</span>
<span>对于许多 Cloud-Init 镜像，需要配置串行控制台并将其用作显示。但是，如果配置不适用于给定图像，请切换回默认显示。</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">qm set 9000 --serial0 socket --vga serial0</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>In a last step, it is helpful to convert the VM into a template. From this template you can then quickly create linked clones. The deployment from VM templates is much faster than creating a full clone (copy).</span>
<span>在最后一步中，将 VM 转换为模板会很有帮助。通过此模板，您可以快速创建链接克隆。从 VM 模板进行部署比创建完整克隆（副本）要快得多。</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">qm template 9000</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><h3 id='deploying-cloud-init-templates-部署-cloud-init-模板'><span>Deploying Cloud-Init Templates 部署 Cloud-Init 模板 </span></h3><p><a href='https://pve.proxmox.com/pve-docs/images/screenshot/gui-cloudinit-config.png'><img src="https://pve.proxmox.com/pve-docs/images/screenshot/gui-cloudinit-config.png" referrerpolicy="no-referrer" alt="screenshot/gui-cloudinit-config.png"></a></p><p><span>You can easily deploy such a template by cloning:</span>
<span>您可以通过克隆轻松部署此类模板：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">qm clone 9000 123 --name ubuntu2</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>Then configure the SSH public key used for authentication, and configure the IP setup:</span>
<span>然后配置用于身份验证的 SSH 公钥，并配置 IP 设置：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">qm set 123 --sshkey ~/.ssh/id_rsa.pub</span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">qm set 123 --ipconfig0 ip=10.0.10.123/24,gw=10.0.10.1</span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 52px;"></div><div class="CodeMirror-gutters" style="display: none; height: 52px;"></div></div></div></pre><p><span>You can also configure all the Cloud-Init options using a single command only. We have simply split the above example to separate the commands for reducing the line length. Also make sure to adopt the IP setup for your specific environment.</span>
<span>您还可以仅使用单个命令配置所有 Cloud-Init 选项。我们简单地拆分了上面的示例，以分离用于减少行长度的命令。此外，请确保采用适用于特定环境的 IP 设置。</span></p><h3 id='custom-cloud-init-configuration-自定义-cloud-init-配置'><span>Custom Cloud-Init Configuration 自定义 Cloud-Init 配置 </span></h3><p><span>The Cloud-Init integration also allows custom config files to be used instead of the automatically generated configs. This is done via the cicustom option on the command line:</span>
<span>Cloud-Init 集成还允许使用自定义配置文件来代替自动生成的配置。这是通过命令行上的 cicustom 选项完成的：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">qm set 9000 --cicustom "user=&lt;volume&gt;,network=&lt;volume&gt;,meta=&lt;volume&gt;"</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 52px;"></div><div class="CodeMirror-gutters" style="display: none; height: 52px;"></div></div></div></pre><p><span>The custom config files have to be on a storage that supports snippets and have to be available on all nodes the VM is going to be migrated to. Otherwise the VM won’t be able to start. For example:</span>
<span>自定义配置文件必须位于支持代码片段的存储上，并且必须在 VM 要迁移到的所有节点上都可用。否则，VM 将无法启动。例如：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">qm set 9000 --cicustom "user=local:snippets/userconfig.yaml"</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>There are three kinds of configs for Cloud-Init. The first one is the user config as seen in the example above. The second is the network config and the third the meta config. They can all be specified together or mixed and matched however needed. The automatically generated config will be used for any that don’t have a custom config file specified.</span>
<span>Cloud-Init 有三种配置。第一个是用户配置，如上例所示。第二个是网络配置，第三个是元配置。它们可以一起指定，也可以根据需要混合和匹配。自动生成的配置将用于任何未指定自定义配置文件的配置。</span></p><p><span>The generated config can be dumped to serve as a base for custom configs:</span>
<span>生成的配置可以被转储，作为自定义配置的基础：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">qm cloudinit dump 9000 user</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>The same command exists for network and meta.</span>
<span>network 和 meta 也存在相同的命令。</span></p><h3 id='cloud-init-on-windows-windows-上的-cloud-init'><span>Cloud-Init on Windows Windows 上的 Cloud-Init </span></h3><p><span>There is a reimplementation of Cloud-Init available for Windows called </span><a href='https://cloudbase.it/'><span>cloudbase-init</span></a><span>. Not every feature of Cloud-Init is available with Cloudbase-Init, and some features differ compared to Cloud-Init.</span>
<span>适用于 Windows 的 Cloud-Init 重新实现，称为 </span><a href='https://cloudbase.it/'><span>cloudbase-init</span></a><span>。并非 Cloud-Init 的每个功能都可用于 Cloudbase-Init，并且与 Cloud-Init 相比，某些功能有所不同。</span></p><p><span>Cloudbase-Init requires both ostype set to any Windows version and the citype set to configdrive2, which is the default with any Windows ostype.</span>
<span>Cloudbase-Init 要求将 ostype 设置为任何 Windows 版本，并将 citype 设置为 configdrive2，这是任何 Windows ostype 的默认值。</span></p><p><span>There are no ready-made cloud images for Windows available for free. Using Cloudbase-Init requires manually installing and configuring a Windows guest.</span>
<span>没有现成的 Windows 云镜像可以免费获得。使用 Cloudbase-Init 需要手动安装和配置 Windows 客户机。</span></p><h3 id='preparing-cloudbase-init-templates-准备cloudbase-init模板'><span>Preparing Cloudbase-Init Templates 准备Cloudbase-Init模板 </span></h3><p><span>The first step is to install Windows in a VM. Download and install Cloudbase-Init in the guest. It may be necessary to install the Beta version. Don’t run Sysprep at the end of the installation. Instead configure Cloudbase-Init first.</span>
<span>第一步是在 VM 中安装 Windows。在客户机中下载并安装 Cloudbase-Init。可能需要安装 Beta 版本。不要在安装结束时运行 Sysprep。而是先配置 Cloudbase-Init。</span></p><p><span>A few common options to set would be:</span>
<span>要设置的几个常见选项包括：</span></p><ul><li><p><em><span>username</span></em><span>: This sets the username of the administrator</span>
<em><span>username</span></em><span>：设置管理员的用户名</span></p></li><li><p><em><span>groups</span></em><span>: This allows one to add the user to the Administrators group</span>
<em><span>groups</span></em><span>：这允许将用户添加到管理员组</span></p></li><li><p><em><span>inject_user_password</span></em><span>: Set this to true to allow setting the password in the VM config</span>
<em><span>inject_user_password</span></em><span>：将此设置为 true 以允许在 VM 配置中设置密码</span></p></li><li><p><em><span>first_logon_behaviour</span></em><span>: Set this to no to not require a new password on login</span>
<em><span>first_logon_behaviour</span></em><span>：将此项设置为否，以在登录时不需要新密码</span></p></li><li><p><em><span>rename_admin_user</span></em><span>: Set this to true to allow renaming the default Administrator user to the username specified with username</span>
<em><span>rename_admin_user</span></em><span>：将此设置为 true 以允许将默认管理员用户重命名为使用 username 指定的用户名</span></p></li><li><p><em><span>metadata_services</span></em><span>: Set this to cloudbaseinit.metadata.services.configdrive.ConfigDriveService for Cloudbase-Init to first check this serivce. Otherwise it may take a few minutes for Cloudbase-Init to configure the system after boot.</span>
<em><span>metadata_services</span></em><span>：将此设置为 cloudbaseinit.metadata.services.configdrive.ConfigDriveService，以便 Cloudbase-Init 首先检查此服务。否则，Cloudbase-Init 可能需要几分钟时间才能在启动后配置系统。</span></p></li></ul><p><span>Some plugins, for example the SetHostnamePlugin, require reboots and will do so automatically. To disable automatic reboots by Cloudbase-Init, you can set allow_reboot to false.</span>
<span>某些插件（例如 SetHostnamePlugin）需要重新启动，并且会自动重新启动。要禁用 Cloudbase-Init 的自动重启，您可以将 allow_reboot设置为 false。</span></p><p><span>A full set of configuration options can be found in the </span><a href='https://cloudbase-init.readthedocs.io/en/latest/config.html'><span>official cloudbase-init documentation</span></a><span>.</span>
<span>完整的配置选项可以在</span><a href='https://cloudbase-init.readthedocs.io/en/latest/config.html'><span>官方的 cloudbase-init 文档</span></a><span>中找到。</span></p><p><span>It can make sense to make a snapshot after configuring in case some parts of the config still need adjustments. After configuring Cloudbase-Init you can start creating the template. Shutdown the Windows guest, add a Cloud-Init disk and make it into a template.</span>
<span>在配置后创建快照是有意义的，以防配置的某些部分仍需要调整。配置 Cloudbase-Init 后，您可以开始创建模板。关闭 Windows 客户机，添加 Cloud-Init 磁盘并将其制作成模板。</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">qm set 9000 --ide2 local-lvm:cloudinit</span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">qm template 9000</span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 52px;"></div><div class="CodeMirror-gutters" style="display: none; height: 52px;"></div></div></div></pre><p><span>Clone the template into a new VM:</span>
<span>将模板克隆到新的 VM 中：Clone the template into a new VM：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">qm clone 9000 123 --name windows123</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>Then set the password, network config and SSH key:</span>
<span>然后设置密码、网络配置和 SSH 密钥：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">qm set 123 --cipassword &lt;password&gt;</span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">qm set 123 --ipconfig0 ip=10.0.10.123/24,gw=10.0.10.1</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">qm set 123 --sshkey ~/.ssh/id_rsa.pub</span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 78px;"></div><div class="CodeMirror-gutters" style="display: none; height: 78px;"></div></div></div></pre><p><span>Make sure that the ostype is set to any Windows version before setting the password. Otherwise the password will be encrypted and Cloudbase-Init will use the encrypted password as plaintext password.</span>
<span>在设置密码之前，请确保将 ostype 设置为任何 Windows 版本。否则，密码将被加密，Cloudbase-Init将使用加密后的密码作为明文密码。</span></p><p><span>When everything is set, start the cloned guest. On the first boot the login won’t work and it will reboot automatically for the changed hostname. After the reboot the new password should be set and login should work.</span>
<span>设置好所有内容后，启动克隆的客户机。在第一次启动时，登录将不起作用，它将自动为更改的主机名重新启动。重新启动后，应设置新密码并登录应可以正常工作。</span></p><h3 id='cloudbase-init-and-sysprep-cloudbase-init-和-sysprep'><span>Cloudbase-Init and Sysprep Cloudbase-init 和 sysprep </span></h3><p><span>Sysprep is a feature to reset the configuration of Windows and provide a new system. This can be used in conjunction with Cloudbase-Init to create a clean template.</span>
<span>Sysprep 是一项重置 Windows 配置并提供新系统的功能。这可以与 Cloudbase-Init 结合使用来创建一个干净的模板。</span></p><p><span>When using Sysprep there are 2 configuration files that need to be adapted. The first one is the normal configuration file, the second one is the one ending in -unattend.conf.</span>
<span>使用 Sysprep 时，有 2 个配置文件需要适配。第一个是普通的配置文件，第二个是以 -unattend.conf 结尾的文件。</span></p><p><span>Cloudbase-Init runs in 2 steps, first the Sysprep step using the -unattend.conf and then the regular step using the primary config file.</span>
<span>Cloudbase-Init 分 2 个步骤运行，首先是使用 -unattend.conf 的 Sysprep 步骤，然后是使用主配置文件的常规步骤。</span></p><p><span>For Windows Server running Sysprep with the provided Unattend.xml file should work out of the box. Normal Windows versions however require additional steps:</span>
<span>对于使用提供的 Unattend.xml 文件运行 Sysprep 的 Windows Server，应该开箱即用。但是，普通的 Windows 版本需要额外的步骤：</span></p><ol><li><p><span>Open a PowerShell instance</span>
<span>打开 PowerShell 实例</span></p></li><li><p><span>Enable the Administrator user:</span>
<span>启用管理员用户：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">net user Administrator /active:yes`</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre></li><li><p><span>Install Cloudbase-Init using the Administrator user</span>
<span>使用管理员用户安装 Cloudbase-Init</span></p></li><li><p><span>Modify Unattend.xml to include the command to enable the Administrator user on the first boot after sysprepping:</span>
<span>修改Unattend.xml以包含用于在 sysprepping 后首次启动时启用 Administrator 用户的命令：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation" style=""><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">&lt;RunSynchronousCommand wcm:action="add"&gt;</span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">  &lt;Path&gt;net user administrator /active:yes&lt;/Path&gt;</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">  &lt;Order&gt;1&lt;/Order&gt;</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">  &lt;Description&gt;Enable Administrator User&lt;/Description&gt;</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">&lt;/RunSynchronousCommand&gt;</span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 130px;"></div><div class="CodeMirror-gutters" style="display: none; height: 130px;"></div></div></div></pre><p><span>Make sure the </span><Order><span> does not conflict with other synchronous commands. Modify </span><Order><span> of the Cloudbase-Init command to run after this one by increasing the number to a higher value: </span><Order><span>2</span></Order>
<span>确保 </span><Order><span> 不与其他同步命令冲突。通过将数字增加到更高的值，修改 Cloudbase-Init 命令的 </span><Order><span> 以在此命令之后运行：</span><Order><span>2</span></Order></p></li><li><p><span>(Windows 11 only) Remove the conflicting Microsoft.OneDriveSync package:</span>
<span>（仅限 Windows 11）删除冲突的 Microsoft.OneDriveSync 包：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">Get-AppxPackage -AllUsers Microsoft.OneDriveSync | Remove-AppxPackage -AllUsers</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 52px;"></div><div class="CodeMirror-gutters" style="display: none; height: 52px;"></div></div></div></pre></li><li><p><span>cd into the Cloudbase-Init config directory:</span>
<span>cd 进入 Cloudbase-Init 配置目录：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">cd 'C:\Program Files\Cloudbase Solutions\Cloudbase-Init\conf'</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 52px;"></div><div class="CodeMirror-gutters" style="display: none; height: 52px;"></div></div></div></pre></li><li><p><span>(optional) Create a snapshot of the VM before Sysprep in case of a misconfiguration</span>
<span>（可选）在 Sysprep 之前创建 VM 的快照，以防配置错误</span></p></li><li><p><span>Run Sysprep: 运行 Sysprep：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">C:\Windows\System32\Sysprep\sysprep.exe /generalize /oobe /unattend:Unattend.xml</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 52px;"></div><div class="CodeMirror-gutters" style="display: none; height: 52px;"></div></div></div></pre></li></ol><p><span>After following the above steps the VM should be in shut down state due to the Sysprep. Now you can make it into a template, clone it and configure it as needed.</span>
<span>执行上述步骤后，由于 Sysprep，VM 应处于关闭状态。现在，您可以将其制作成模板，克隆它并根据需要进行配置。</span></p><h3 id='cloud-init-specific-options-特定于-cloud-init-的选项'><span>Cloud-Init specific Options 特定于 Cloud-Init 的选项 </span></h3><ul><li><p><span>cicustom: [meta=</span><volume><span>] [,network=</span><volume><span>] [,user=</span><volume><span>] [,vendor=</span><volume><span>] cicustom： [meta=</span><volume><span>] [，network=</span><volume><span>] [，user=</span><volume><span>] [，vendor=</span><volume><span>]</span></p><p><span>Specify custom files to replace the automatically generated ones at start. 指定自定义文件以替换开始时自动生成的文件。meta=</span><volume><span> 元=&lt;体积&gt;Specify a custom file containing all meta data passed to the VM via&quot; .&quot; cloud-init. This is provider specific meaning configdrive2 and nocloud differ. 指定一个自定义文件，其中包含通过“ .” cloud-init传递到VM的所有元数据。这是特定于提供商的，这意味着 configdrive2 和 nocloud 不同。network=</span><volume><span> 网络=&lt;卷&gt;To pass a custom file containing all network data to the VM via cloud-init. 通过 cloud-init 将包含所有网络数据的自定义文件传递给 VM。user=</span><volume><span> 用户=&lt;音量&gt;To pass a custom file containing all user data to the VM via cloud-init. 通过 cloud-init 将包含所有用户数据的自定义文件传递给 VM。vendor=</span><volume><span>To pass a custom file containing all vendor data to the VM via cloud-init. 通过 cloud-init 将包含所有供应商数据的自定义文件传递给 VM。</span></p></li><li><p><span>cipassword: </span><string><span> cipassword： </span><string></p><p><span>Password to assign the user. Using this is generally not recommended. Use ssh keys instead. Also note that older cloud-init versions do not support hashed passwords. 用于分配用户的密码。通常不建议使用此工具。请改用 ssh 密钥。另请注意，较旧的 cloud-init 版本不支持哈希密码。</span></p></li><li><p><span>citype: &lt;configdrive2 | nocloud | opennebula&gt; citype： &lt;configdrive2 | nocloud | opennebula&gt;</span></p><p><span>Specifies the cloud-init configuration format. The default depends on the configured operating system type (ostype. We use the nocloud format for Linux, and configdrive2 for windows. 指定 cloud-init 配置格式。默认值取决于配置的操作系统类型 （ostype.我们对 Linux 使用 nocloud 格式，对 Windows 使用 configdrive2 格式。</span></p></li><li><p><span>ciupgrade: </span><boolean><span> (</span><em><span>default =</span></em><span> 1) ciupgrade： </span><boolean><span> （</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>do an automatic package upgrade after the first boot. 首次启动后执行自动包升级。</span></p></li><li><p><span>ciuser: </span><string><span> ciuser： </span><string></p><p><span>User name to change ssh keys and password for instead of the image’s configured default user. 要更改 ssh 密钥和密码的用户名，而不是映像配置的默认用户。</span></p></li><li><p><span>ipconfig[n]: [gw=</span><GatewayIPv4><span>] [,gw6=</span><GatewayIPv6><span>] [,ip=&lt;IPv4Format/CIDR&gt;] [,ip6=&lt;IPv6Format/CIDR&gt;] ipconfig[n]： [gw=</span><GatewayIPv4><span>] [，gw6=</span><GatewayIPv6><span>] [，ip=&lt;IPv4Format/CIDR&gt;] [，ip6=&lt;IPv6Format/CIDR&gt;]</span></p><p><span>Specify IP addresses and gateways for the corresponding interface. 为相应接口指定 IP 地址和网关。IP addresses use CIDR notation, gateways are optional but need an IP of the same type specified. IP 地址使用 CIDR 表示法，网关是可选的，但需要指定的相同类型的 IP。The special string </span><em><span>dhcp</span></em><span> can be used for IP addresses to use DHCP, in which case no explicit gateway should be provided. For IPv6 the special string </span><em><span>auto</span></em><span> can be used to use stateless autoconfiguration. This requires cloud-init 19.4 or newer. 特殊字符串 </span><em><span>dhcp</span></em><span> 可用于 IP 地址以使用 DHCP，在这种情况下，不应提供显式网关。对于 IPv6，可以使用特殊字符串 </span><em><span>auto</span></em><span> 来使用无状态自动配置。这需要 cloud-init 19.4 或更高版本。If cloud-init is enabled and neither an IPv4 nor an IPv6 address is specified, it defaults to using dhcp on IPv4. 如果启用了 cloud-init，且未指定 IPv4 和 IPv6 地址，则默认在 IPv4 上使用 dhcp。gw=</span><GatewayIPv4><span>Default gateway for IPv4 traffic. IPv4 流量的默认网关。</span><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbL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DfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"><span>Requires option(s): ip 需要选项： ipgw6=</span><GatewayIPv6><span>Default gateway for IPv6 traffic. IPv6 流量的默认网关。</span><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9YHhAIJFCExAsKUkE8IAFFPIDUIqhBRSDRBUqC%0ACimFFBCBpCWx02IaZ3G2SdyxPZ7vHh6+mcnSZnFjKIge6Wj8zYzvPf9z/me5d8TM+F8WfbkNuFx5%0ABcDLLf/fAEZGRmx4eNh6enqsp6fHhoeHbWRk5D9aFeSlVqHNmzfb6H33sHnT7ZQmD5GfOMax6Sm+%0APl5h1Yc+xpYtW2SBbX1ReUkRGBkZsdH77mHLW95EOv4Ms3ueJh6YYPHUFF9aljJ63z3cf//9/5FI%0AvKQIDA8P293L2yhVjjH7t51ocDiviFecF46n7XzBreChhx4qNhH5t0XjJUVgx44ddGUZ9b/vIpQD%0AoRQIWSDJAiFL6B9axo4dO4gxAmANWVDLG+Ln82URMRGhVCqRHxonlAPqFXWKC4r6IhI6OMjMzBN4%0A/4LlTUQQEZxzZ32QJAlpmrb+p16vU6vVOHXq1AWjN18AnDj0F971vrs4OnmYJVkoDA4FCPUO172I%0ACgnt7SV++4vvsGhRJx3tJbIsRVVpsUnOBBABBVFEClKYwbKr7sTM7EIUnBcA7z21k7t49x1X8JXv%0AbOWra7rw5QRtcN8PLCfvvZJvb9vJycpJpg4/hp/N0I4SMQs4Jw0A5zBXHGiCaIZIKABgpGlKjPEF%0A0TpT5pUDRXiVt99+Le03r+WzuytM1gO6pB/3+o0cbxvk8yOPMjW6i2iR2lxOjJDHSDMFogmGwzQ7%0ArRJAUpAENA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YnT7UTxw4xsHJ%0Ao4yOjfOP8QOMjx/k4OQx7r777lY0zycXvJ02M4sxMjg4SL1eR0TYsGEDw8PD9PX10d7ejogUN3a1%0AGqpKCIE8z5mdnUVVqVarbN++nba2Nvbu3csDDzyAqrJ8+atb+zjn6e/vZ/Xq1axatYq1a9fS29tL%0AlmUMDQ1RKpXOm9EXvV6v1+tWr9eZnp5mZmaGWq1GjLHF62aiNZ+bnPfe45xrvTZzxMyYmZk56+LX%0AzKjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"><span>Requires option(s): ip6 需要选项： ip6ip=&lt;IPv4Format/CIDR&gt; (</span><em><span>default =</span></em><span> dhcp) ip=&lt;IPv4Format/CIDR&gt;（</span><em><span>默认值 =</span></em><span> dhcp）IPv4 address in CIDR format. CIDR 格式的 IPv4 地址。ip6=&lt;IPv6Format/CIDR&gt; (</span><em><span>default =</span></em><span> dhcp) ip6=&lt;IPv6Format/CIDR&gt;（</span><em><span>默认 =</span></em><span> dhcp）IPv6 address in CIDR format. CIDR 格式的 IPv6 地址。</span></p></li><li><p><span>nameserver: </span><string><span> 名称服务器： </span><string></p><p><span>Sets DNS server IP address for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set. 设置容器的 DNS 服务器 IP 地址。如果 searchdomain 和 nameserver 均未设置，Create 将自动使用主机的设置。</span></p></li><li><p><span>searchdomain: </span><string><span> 搜索域： </span><string></p><p><span>Sets DNS search domains for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set. 设置容器的 DNS 搜索域。如果 searchdomain 和 nameserver 均未设置，Create 将自动使用主机的设置。</span></p></li><li><p><span>sshkeys: </span><string><span> sshkeys： </span><string></p><p><span>Setup public SSH keys (one key per line, OpenSSH format). 设置公共 SSH 密钥（每行一个密钥，OpenSSH 格式）。</span></p></li></ul><h2 id='pcie-passthrough-pcie）-直通'><span>PCI(e) Passthrough PCI（e） 直通</span></h2><p><span>PCI(e) passthrough is a mechanism to give a virtual machine control over a PCI device from the host. This can have some advantages over using virtualized hardware, for example lower latency, higher performance, or more features (e.g., offloading).</span>
<span>PCI（e） 直通是一种机制，用于让虚拟机从主机控制 PCI 设备。与使用虚拟化硬件相比，这可能具有一些优势，例如更低的延迟、更高的性能或更多功能（例如，卸载）。</span></p><p><span>But, if you pass through a device to a virtual machine, you cannot use that device anymore on the host or in any other VM.</span>
<span>但是，如果将设备传递到虚拟机，则无法在主机或任何其他 VM 中再使用该设备。</span></p><p><span>Note that, while PCI passthrough is available for i440fx and q35 machines, PCIe passthrough is only available on q35 machines. This does not mean that PCIe capable devices that are passed through as PCI devices will only run at PCI speeds. Passing through devices as PCIe just sets a flag for the guest to tell it that the device is a PCIe device instead of a &quot;really fast legacy PCI device&quot;. Some guest applications benefit from this.</span>
<span>请注意，虽然 PCI 直通可用于 i440fx 和 q35 计算机，但 PCIe 直通仅适用于 q35 计算机。这并不意味着作为 PCI 设备传递的支持 PCIe 的设备将仅以 PCI 速度运行。作为 PCIe 传递设备只是为访客设置一个标志，告诉它该设备是 PCIe 设备，而不是“真正快速的传统 PCI 设备”。一些客户机应用程序从中受益。</span></p><h3 id='general-requirements-一般要求'><span>General Requirements 一般要求 </span></h3><p><span>Since passthrough is performed on real hardware, it needs to fulfill some requirements. A brief overview of these requirements is given below, for more information on specific devices, see </span><a href='https://pve.proxmox.com/wiki/PCI_Passthrough'><span>PCI Passthrough Examples</span></a><span>.</span>
<span>由于直通是在真实硬件上执行的，因此需要满足一些要求。下面简要概述了这些要求，有关特定设备的更多信息，请参阅 </span><a href='https://pve.proxmox.com/wiki/PCI_Passthrough'><span>PCI 直通示例</span></a><span>。</span></p><h4 id='hardware-硬件'><span>Hardware 硬件</span></h4><p><span>Your hardware needs to support IOMMU (</span><strong><span>I</span></strong><span>/</span><strong><span>O</span></strong><span> </span><strong><span>M</span></strong><span>emory </span><strong><span>M</span></strong><span>anagement </span><strong><span>U</span></strong><span>nit) interrupt remapping, this includes the CPU and the motherboard.</span>
<span>您的硬件需要支持 IOMMU （</span><strong><span>I</span></strong><span>/</span><strong><span>O</span></strong><span> </span><strong><span>M</span></strong><span>emory </span><strong><span>M</span></strong><span>anagement </span><strong><span>U</span></strong><span>nit） 中断重新映射，这包括 CPU 和主板。</span></p><p><span>Generally, Intel systems with VT-d and AMD systems with AMD-Vi support this. But it is not guaranteed that everything will work out of the box, due to bad hardware implementation and missing or low quality drivers.</span>
<span>通常，具有 VT-d 的 Intel 系统和具有 AMD-Vi 的 AMD 系统都支持此功能。但是，由于硬件实现不佳以及驱动程序丢失或质量低下，并不能保证一切都开箱即用。</span></p><p><span>Further, server grade hardware has often better support than consumer grade hardware, but even then, many modern system can support this.</span>
<span>此外，服务器级硬件通常比消费级硬件具有更好的支持，但即便如此，许多现代系统也可以支持这一点。</span></p><p><span>Please refer to your hardware vendor to check if they support this feature under Linux for your specific setup.</span>
<span>请咨询您的硬件供应商，以检查他们是否支持在 Linux 下针对您的特定设置使用此功能。</span></p><h4 id='determining-pci-card-address-确定pci卡地址'><span>Determining PCI Card Address 确定PCI卡地址</span></h4><p><span>The easiest way is to use the GUI to add a device of type &quot;Host PCI&quot; in the VM’s hardware tab. Alternatively, you can use the command line.</span>
<span>最简单的方法是使用 GUI 在 VM 的硬件选项卡中添加“Host PCI”类型的设备。或者，您可以使用命令行。</span></p><p><span>You can locate your card using</span>
<span>您可以使用以下方法找到您的卡</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> lspci</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><h4 id='configuration-配置'><span>Configuration 配置</span></h4><p><span>Once you ensured that your hardware supports passthrough, you will need to do some configuration to enable PCI(e) passthrough.</span>
<span>一旦确保硬件支持直通，就需要进行一些配置以启用 PCI（e） 直通。</span></p><p><span>IOMMU IOMMU的</span></p><p><span>First, you will have to enable IOMMU support in your BIOS/UEFI. Usually the corresponding setting is called IOMMU or VT-d, but you should find the exact option name in the manual of your motherboard.</span>
<span>首先，您必须在 BIOS/UEFI 中启用 IOMMU 支持。通常，相应的设置称为 IOMMU 或 VT-d，但您应该在主板手册中找到确切的选项名称。</span></p><p><span>For Intel CPUs, you also need to enable the IOMMU on the kernel command line kernels by adding:</span>
<span>对于 Intel CPU，您还需要通过添加以下内容在内核命令行内核上启用 IOMMU：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> intel_iommu=on</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>For AMD CPUs it should be enabled automatically.</span>
<span>对于 AMD CPU，它应该自动启用。</span></p><p><span>IOMMU Passthrough Mode IOMMU 直通模式</span></p><p><span>If your hardware supports IOMMU passthrough mode, enabling this mode might increase performance. This is because VMs then bypass the (default) DMA translation normally performed by the hyper-visor and instead pass DMA requests directly to the hardware IOMMU. To enable these options, add:</span>
<span>如果您的硬件支持 IOMMU 直通模式，则启用此模式可能会提高性能。这是因为 VM 会绕过通常由虚拟机监控程序执行的（默认）DMA 转换，而是将 DMA 请求直接传递给硬件 IOMMU。要启用这些选项，请添加：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> iommu=pt</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>to the kernel commandline.</span>
<span>到内核命令行。</span></p><p><span>Kernel Modules 内核模块</span></p><p><span>You have to make sure the following modules are loaded. This can be achieved by adding them to ‘</span><em><span>/etc/modules</span></em><span>’. In kernels newer than 6.2 (Proxmox VE 8 and onward) the </span><em><span>vfio_virqfd</span></em><span> module is part of the </span><em><span>vfio</span></em><span> module, therefore loading </span><em><span>vfio_virqfd</span></em><span> in Proxmox VE 8 and newer is not necessary.</span>
<span>您必须确保已加载以下模块。这可以通过将它们添加到 &#39;</span><em><span>/etc/modules</span></em><span>&#39; 来实现。在 6.2 及以上版本（Proxmox VE 8 及更高版本）的内核中，</span><em><span>vfio_virqfd</span></em><span> 模块是 </span><em><span>vfio</span></em><span> 模块的一部分，因此无需在 Proxmox VE 8 及更高版本中加载</span><em><span>vfio_virqfd</span></em><span>。</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> vfio</span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> vfio_iommu_type1</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> vfio_pci</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> vfio_virqfd #not needed if on kernel 6.2 or newer</span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 104px;"></div><div class="CodeMirror-gutters" style="display: none; height: 104px;"></div></div></div></pre><p><span>After changing anything modules related, you need to refresh your initramfs. On Proxmox VE this can be done by executing:</span>
<span>更改任何与模块相关的内容后，您需要刷新 initramfs。在Proxmox VE上，这可以通过执行以下命令来完成：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># update-initramfs -u -k all</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>To check if the modules are being loaded, the output of</span>
<span>要检查模块是否正在加载，输出</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># lsmod | grep vfio</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>should include the four modules from above.</span>
<span>应包括上面的四个模块。</span></p><p><span>Finish Configuration 完成配置</span></p><p><span>Finally reboot to bring the changes into effect and check that it is indeed enabled.</span>
<span>最后，重新启动以使更改生效，并检查它是否确实已启用。</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># dmesg | grep -e DMAR -e IOMMU -e AMD-Vi</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>should display that IOMMU, Directed I/O or Interrupt Remapping is enabled, depending on hardware and kernel the exact message can vary.</span>
<span>应显示已启用 IOMMU、定向 I/O 或中断重新映射，根据硬件和内核的不同，确切的消息可能会有所不同。</span></p><p><span>For notes on how to troubleshoot or verify if IOMMU is working as intended, please see the </span><a href='https://pve.proxmox.com/wiki/PCI_Passthrough#Verifying_IOMMU_parameters'><span>Verifying IOMMU Parameters</span></a><span> section in our wiki.</span>
<span>有关如何排除故障或验证 IOMMU 是否按预期工作的说明，请参阅我们 wiki 中的</span><a href='https://pve.proxmox.com/wiki/PCI_Passthrough#Verifying_IOMMU_parameters'><span>验证 IOMMU 参数</span></a><span>部分。</span></p><p><span>It is also important that the device(s) you want to pass through are in a </span><strong><span>separate</span></strong><span> IOMMU group. This can be checked with a call to the Proxmox VE API:</span>
<span>同样重要的是，您要通过的设备位于</span><strong><span>单独的</span></strong><span> IOMMU 组中。这可以通过调用 Proxmox VE API 来检查：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># pvesh get /nodes/{nodename}/hardware/pci --pci-class-blacklist ""</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 52px;"></div><div class="CodeMirror-gutters" style="display: none; height: 52px;"></div></div></div></pre><p><span>It is okay if the device is in an IOMMU group together with its functions (e.g. a GPU with the HDMI Audio device) or with its root port or PCI(e) bridge.</span>
<span>如果设备与其功能（例如，GPU 和 HDMI 音频设备）或其根端口或 PCI（e） 桥一起位于 IOMMU 组中，则没关系。</span></p><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9YHhAIJFCExAsKUkE8IAFFPIDUIqhBRSDRBUqC%0ACimFFBCBpCWx02IaZ3G2SdyxPZ7vHh6+mcnSZnFjKIge6Wj8zYzvPf9z/me5d8TM+F8WfbkNuFx5%0ABcDLLf/fAEZGRmx4eNh6enqsp6fHhoeHbWRk5D9aFeSlVqHNmzfb6H33sHnT7ZQmD5GfOMax6Sm+%0APl5h1Yc+xpYtW2SBbX1ReUkRGBkZsdH77mHLW95EOv4Ms3ueJh6YYPHUFF9aljJ63z3cf//9/5FI%0AvKQIDA8P293L2yhVjjH7t51ocDiviFecF46n7XzBreChhx4qNhH5t0XjJUVgx44ddGUZ9b/vIpQD%0AoRQIWSDJAiFL6B9axo4dO4gxAmANWVDLG+Ln82URMRGhVCqRHxonlAPqFXWKC4r6IhI6OMjMzBN4%0A/4LlTUQQEZxzZ32QJAlpmrb+p16vU6vVOHXq1AWjN18AnDj0F971vrs4OnmYJVkoDA4FCPUO172I%0ACgnt7SV++4vvsGhRJx3tJbIsRVVpsUnOBBABBVFEClKYwbKr7sTM7EIUnBcA7z21k7t49x1X8JXv%0AbOWra7rw5QRtcN8PLCfvvZJvb9vJycpJpg4/hp/N0I4SMQs4Jw0A5zBXHGiCaIZIKABgpGlKjPEF%0A0TpT5pUDRXiVt99+Le03r+WzuytM1gO6pB/3+o0cbxvk8yOPMjW6i2iR2lxOjJDHSDMFogmGwzQ7%0ArRJAUpAENAGXIZq2AFzQpvkACCEQcahP+cRH3sKHn9zHXU+MM7rtGeD33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zycXvJ02M4sxMjg4SL1eR0TYsGEDw8PD9PX10d7ejogUN3a1%0AGqpKCIE8z5mdnUVVqVarbN++nba2Nvbu3csDDzyAqrJ8+atb+zjn6e/vZ/Xq1axatYq1a9fS29tL%0AlmUMDQ1RKpXOm9EXvV6v1+tWr9eZnp5mZmaGWq1GjLHF62aiNZ+bnPfe45xrvTZzxMyYmZk56+LX%0AzKjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"></th><th><span>PCI(e) slots PCI（e） 插槽Some platforms handle their physical PCI(e) slots differently. So, sometimes it can help to put the card in a another PCI(e) slot, if you do not get the desired IOMMU group separation. 某些平台以不同的方式处理其物理 PCI（e） 插槽。因此，有时，如果您没有获得所需的 IOMMU 组分离，将卡放在另一个 PCI（e） 插槽中会有所帮助。</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9YHhAIJFCExAsKUkE8IAFFPIDUIqhBRSDRBUqC%0ACimFFBCBpCWx02IaZ3G2SdyxPZ7vHh6+mcnSZnFjKIge6Wj8zYzvPf9z/me5d8TM+F8WfbkNuFx5%0ABcDLLf/fAEZGRmx4eNh6enqsp6fHhoeHbWRk5D9aFeSlVqHNmzfb6H33sHnT7ZQmD5GfOMax6Sm+%0APl5h1Yc+xpYtW2SBbX1ReUkRGBkZsdH77mHLW95EOv4Ms3ueJh6YYPHUFF9aljJ63z3cf//9/5FI%0AvKQIDA8P293L2yhVjjH7t51ocDiviFecF46n7XzBreChhx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SZGEAbN261bZt+zW33XY7IAXXm6Ou0YhIMamaaUOl5WRrzg00viuKWWxpQUOH%0ANAZFQRpD48Xlkig0MTHBB95zG+VSylz1KCbWyDOh2XyK+56IqjWMKigkUnzWnPPFFFRRLZ29SQRU%0AELOGY4pZ6LKOlM07mZ07d/KOtw1TcB4sGkTDiDQ9K1IkrKeYmQC08d7pZLSiRBpE5s7aS0XAHFEK%0AAGY51Wr18g80Zmb33nsvX/z8XdSmj2AWOXhwkrxe46+79jB55Dh/3T2GxUhHextdXW2sXN7PNWtW%0AIQKDA71FFBoAjIgQkVg/a5+oHrU5zIznDhxk964xKpXKggAoTlWW8+OfPorlOQ//cjsDy1bS2dFO%0AW+diVly1iL6+Pqanpzl5qsL4pPHwN3/G1InDlMsZ7Z1tDA30cfWqIa5dexV9fb2YnT7UTxw4xsHJ%0Ao4yOjfOP8QOMjx/k4OQx7r777lY0zycXvJ02M4sxMjg4SL1eR0TYsGEDw8PD9PX10d7ejogUN3a1%0AGqpKCIE8z5mdnUVVqVarbN++nba2Nvbu3csDDzyAqrJ8+atb+zjn6e/vZ/Xq1axatYq1a9fS29tL%0AlmUMDQ1RKpXOm9EXvV6v1+tWr9eZnp5mZmaGWq1GjLHF62aiNZ+bnPfe45xrvTZzxMyYmZk56+LX%0AzKjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"></th><th><span>Unsafe interrupts 不安全的中断For some platforms, it may be necessary to allow unsafe interrupts. For this add the following line in a file ending with ‘.conf’ file in </span><strong><span>/etc/modprobe.d/</span></strong><span>: 对于某些平台，可能需要允许不安全的中断。为此，在 </span><strong><span>/etc/modprobe.d/</span></strong><span> 中以“.conf”文件结尾的文件中添加以下行：</span><code>options vfio_iommu_type1 allow_unsafe_interrupts=1</code><span>Please be aware that this option can make your system unstable. 请注意，此选项可能会使您的系统不稳定。</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><h4 id='gpu-passthrough-notes-gpu-直通说明'><span>GPU Passthrough Notes GPU 直通说明</span></h4><p><span>It is not possible to display the frame buffer of the GPU via NoVNC or SPICE on the Proxmox VE web interface.</span>
<span>无法通过 NoVNC 或 SPICE 在 Proxmox VE Web 界面上显示 GPU 的帧缓冲区。</span></p><p><span>When passing through a whole GPU or a vGPU and graphic output is wanted, one has to either physically connect a monitor to the card, or configure a remote desktop software (for example, VNC or RDP) inside the guest.</span>
<span>当通过整个 GPU 或 vGPU 并需要图形输出时，必须将显示器物理连接到卡，或者在客户机内部配置远程桌面软件（例如 VNC 或 RDP）。</span></p><p><span>If you want to use the GPU as a hardware accelerator, for example, for programs using OpenCL or CUDA, this is not required.</span>
<span>如果要将 GPU 用作硬件加速器，例如，对于使用 OpenCL 或 CUDA 的程序，则不需要这样做。</span></p><h3 id='host-device-passthrough-主机设备直通'><span>Host Device Passthrough 主机设备直通 </span></h3><p><span>The most used variant of PCI(e) passthrough is to pass through a whole PCI(e) card, for example a GPU or a network card.</span>
<span>PCI（e） 直通最常用的变体是通过整个 PCI（e） 卡，例如 GPU 或网卡。</span></p><h4 id='host-configuration-主机配置'><span>Host Configuration 主机配置</span></h4><p><span>Proxmox VE tries to automatically make the PCI(e) device unavailable for the host. However, if this doesn’t work, there are two things that can be done:</span>
<span>Proxmox VE 尝试自动使主机无法使用 PCI（e） 设备。但是，如果这不起作用，则可以执行以下两项操作：</span></p><ul><li><p><span>pass the device IDs to the options of the </span><em><span>vfio-pci</span></em><span> modules by adding</span>
<span>通过将设备 ID 传递给 </span><em><span>vfio-pci</span></em><span> 模块的选项，方法是添加</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> options vfio-pci ids=1234:5678,4321:8765</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>to a .conf file in </span><strong><span>/etc/modprobe.d/</span></strong><span> where 1234:5678 and 4321:8765 are the vendor and device IDs obtained by:</span>
<span>添加到 </span><strong><span>/etc/modprobe.d/</span></strong><span> 中的 .conf 文件，其中 1234：5678 和 4321：8765 是通过以下方式获取的供应商和设备 ID：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># lspci -nn</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre></li><li><p><span>blacklist the driver on the host completely, ensuring that it is free to bind for passthrough, with</span>
<span>将主机上的驱动程序完全列入黑名单，确保它可以自由绑定以进行直通，并使用</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> blacklist DRIVERNAME</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>in a .conf file in </span><strong><span>/etc/modprobe.d/</span></strong><span>.</span>
<span>在 </span><strong><span>/etc/modprobe.d/</span></strong><span> 的 .conf 文件中。</span></p><p><span>To find the drivername, execute</span>
<span>要查找驱动程序名称，请执行</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># lspci -k</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>for example: 例如：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># lspci -k | grep -A 3 "VGA"</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>will output something similar to</span>
<span>将输出类似于以下内容</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">01:00.0 VGA compatible controller: NVIDIA Corporation GP108 [GeForce GT 1030] (rev a1)</span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> &nbsp; &nbsp; &nbsp;  Subsystem: Micro-Star International Co., Ltd. [MSI] GP108 [GeForce GT 1030]</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> &nbsp; &nbsp; &nbsp;  Kernel driver in use: &lt;some-module&gt;</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> &nbsp; &nbsp; &nbsp;  Kernel modules: &lt;some-module&gt;</span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 156px;"></div><div class="CodeMirror-gutters" style="display: none; height: 156px;"></div></div></div></pre><p><span>Now we can blacklist the drivers by writing them into a .conf file:</span>
<span>现在，我们可以通过将驱动程序写入 .conf 文件来将它们列入黑名单：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">echo "blacklist &lt;some-module&gt;" &gt;&gt; /etc/modprobe.d/blacklist.conf</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 52px;"></div><div class="CodeMirror-gutters" style="display: none; height: 52px;"></div></div></div></pre></li></ul><p><span>For both methods you need to </span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_pci_passthrough_update_initramfs'><span>update the initramfs</span></a><span> again and reboot after that.</span>
<span>对于这两种方法，您都需要再次</span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_pci_passthrough_update_initramfs'><span>更新 initramfs</span></a><span> 并在之后重新启动。</span></p><p><span>Should this not work, you might need to set a soft dependency to load the gpu modules before loading </span><em><span>vfio-pci</span></em><span>. This can be done with the </span><em><span>softdep</span></em><span> flag, see also the manpages on </span><em><span>modprobe.d</span></em><span> for more information.</span>
<span>如果这不起作用，您可能需要设置一个软依赖项来加载 gpu 模块，然后再加载 </span><em><span>vfio-pci</span></em><span>。这可以通过 </span><em><span>softdep</span></em><span> 标志来完成，有关更多信息，另请参见 </span><em><span>modprobe.d</span></em><span> 上的手册页。</span></p><p><span>For example, if you are using drivers named </span><some-module><span>:</span>
<span>例如，如果您正在使用名为 ：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># echo "softdep &lt;some-module&gt; pre: vfio-pci" &gt;&gt; /etc/modprobe.d/&lt;some-module&gt;.conf</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 52px;"></div><div class="CodeMirror-gutters" style="display: none; height: 52px;"></div></div></div></pre><p><span>Verify Configuration 验证配置</span></p><p><span>To check if your changes were successful, you can use</span>
<span>要检查更改是否成功，您可以使用</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># lspci -nnk</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>and check your device entry. If it says</span>
<span>并检查您的设备条目。如果它说</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">Kernel driver in use: vfio-pci</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>or the </span><em><span>in use</span></em><span> line is missing entirely, the device is ready to be used for passthrough.</span>
<span>或者“</span><em><span>正在使用</span></em><span>”线路完全丢失，则设备已准备好用于直通。</span></p><h4 id='vm-configuration-vm-配置'><span>VM Configuration VM 配置</span></h4><p><span>When passing through a GPU, the best compatibility is reached when using </span><em><span>q35</span></em><span> as machine type, </span><em><span>OVMF</span></em><span> (</span><em><span>UEFI</span></em><span> for VMs) instead of SeaBIOS and PCIe instead of PCI. Note that if you want to use </span><em><span>OVMF</span></em><span> for GPU passthrough, the GPU needs to have an UEFI capable ROM, otherwise use SeaBIOS instead. To check if the ROM is UEFI capable, see the </span><a href='https://pve.proxmox.com/wiki/PCI_Passthrough#How_to_know_if_a_graphics_card_is_UEFI_.28OVMF.29_compatible'><span>PCI Passthrough Examples</span></a><span> wiki.</span>
<span>当通过 GPU 时，当使用 </span><em><span>q35</span></em><span> 作为机器类型、</span><em><span>OVMF</span></em><span>（VM </span><em><span>的 UEFI</span></em><span>）而不是 SeaBIOS 和 PCIe 而不是 PCI 时，可以达到最佳兼容性。请注意，如果要使用 </span><em><span>OVMF</span></em><span> 进行 GPU 直通，则 GPU 需要具有支持 UEFI 的 ROM，否则请改用 SeaBIOS。要检查 ROM 是否支持 UEFI，请参阅 </span><a href='https://pve.proxmox.com/wiki/PCI_Passthrough#How_to_know_if_a_graphics_card_is_UEFI_.28OVMF.29_compatible'><span>PCI 直通示例</span></a><span> wiki。</span></p><p><span>Furthermore, using OVMF, disabling vga arbitration may be possible, reducing the amount of legacy code needed to be run during boot. To disable vga arbitration:</span>
<span>此外，使用 OVMF，可以禁用 vga 仲裁，从而减少启动期间需要运行的遗留代码量。要禁用 vga 仲裁：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> echo "options vfio-pci ids=&lt;vendor-id&gt;,&lt;device-id&gt; disable_vga=1" &gt; /etc/modprobe.d/vfio.conf</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 52px;"></div><div class="CodeMirror-gutters" style="display: none; height: 52px;"></div></div></div></pre><p><span>replacing the </span><vendor-id><span> and </span><device-id><span> with the ones obtained from:</span>
<span>将 and 替换为从以下位置获得的 and：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># lspci -nn</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>PCI devices can be added in the web interface in the hardware section of the VM. Alternatively, you can use the command line; set the </span><strong><span>hostpciX</span></strong><span> option in the VM configuration, for example by executing:</span>
<span>可以在 VM 的硬件部分的 Web 界面中添加 PCI 设备。或者，您可以使用命令行;在 VM 配置中设置 </span><strong><span>hostpciX</span></strong><span> 选项，例如执行：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm set VMID -hostpci0 00:02.0</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>or by adding a line to the VM configuration file:</span>
<span>或者向 VM 配置文件添加一行：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> hostpci0: 00:02.0</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>If your device has multiple functions (e.g., ‘00:02.0’ and ‘00:02.1’ ), you can pass them through all together with the shortened syntax </span><code>00:02`*. This is equivalent with checking the</code><span>All Functions`* checkbox in the web interface.</span>
<span>如果您的设备具有多个功能（例如，“00：02.0”和“00：02.1”），则可以使用缩短的语法“00：02”将它们一起传递</span><em><span>。这相当于在 Web 界面中选中“所有功能”</span></em><span>复选框。</span></p><p><span>There are some options to which may be necessary, depending on the device and guest OS:</span>
<span>根据设备和客户操作系统的不同，可能需要一些选项：</span></p><ul><li><p><strong><span>x-vga=on|off</span></strong><span> marks the PCI(e) device as the primary GPU of the VM. With this enabled the </span><strong><span>vga</span></strong><span> configuration option will be ignored.</span>
<strong><span>x-vga=on|off</span></strong><span> 将 PCI（e） 设备标记为 VM 的主 GPU。启用此功能后，</span><strong><span>vga</span></strong><span> 配置选项将被忽略。</span></p></li><li><p><strong><span>pcie=on|off</span></strong><span> tells Proxmox VE to use a PCIe or PCI port. Some guests/device combination require PCIe rather than PCI. PCIe is only available for </span><em><span>q35</span></em><span> machine types.</span>
<strong><span>pcie=on|off</span></strong><span> 告诉 Proxmox VE 使用 PCIe 或 PCI 端口。某些客户机/设备组合需要 PCIe，而不是 PCI。PCIe 仅适用于 </span><em><span>q35</span></em><span> 机器类型。</span></p></li><li><p><strong><span>rombar=on|off</span></strong><span> makes the firmware ROM visible for the guest. Default is on. Some PCI(e) devices need this disabled.</span>
<strong><span>rombar=on|off</span></strong><span> 使固件 ROM 对客户机可见。默认值为开启。某些 PCI（e） 设备需要禁用此功能。</span></p></li><li><p><strong><span>romfile=</span><path></strong><span>, is an optional path to a ROM file for the device to use. This is a relative path under </span><strong><span>/usr/share/kvm/</span></strong><span>.</span>
<strong><span>romfile=</span><path></strong><span>，是设备要使用的 ROM 文件的可选路径。这是 </span><strong><span>/usr/share/kvm/</span></strong><span> 下的相对路径。</span></p></li></ul><p><span>Example 例</span></p><p><span>An example of PCIe passthrough with a GPU set to primary:</span>
<span>将 GPU 设置为主的 PCIe 直通示例：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm set VMID -hostpci0 02:00,pcie=on,x-vga=on</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>PCI ID overrides PCI ID 覆盖</span></p><p><span>You can override the PCI vendor ID, device ID, and subsystem IDs that will be seen by the guest. This is useful if your device is a variant with an ID that your guest’s drivers don’t recognize, but you want to force those drivers to be loaded anyway (e.g. if you know your device shares the same chipset as a supported variant).</span>
<span>您可以覆盖客户机将看到的 PCI 供应商 ID、设备 ID 和子系统 ID。如果您的设备是具有客户机驱动程序无法识别的 ID 的变体，但您仍然想强制加载这些驱动程序（例如，如果您知道您的设备与受支持的变体共享相同的芯片组），这将非常有用。</span></p><p><span>The available options are vendor-id, device-id, sub-vendor-id, and sub-device-id. You can set any or all of these to override your device’s default IDs.</span>
<span>可用选项包括 vendor-id、device-id、sub-vendor-id 和 sub-device-id。您可以设置其中任何一项或全部来覆盖设备的默认 ID。</span></p><p><span>For example: 例如：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm set VMID -hostpci0 02:00,device-id=0x10f6,sub-vendor-id=0x0000</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 52px;"></div><div class="CodeMirror-gutters" style="display: none; height: 52px;"></div></div></div></pre><h3 id='sr-iov-sr-iov型'><span>SR-IOV SR-IOV型 </span></h3><p><span>Another variant for passing through PCI(e) devices is to use the hardware virtualization features of your devices, if available.</span>
<span>通过 PCI（e） 设备的另一种变体是使用设备的硬件虚拟化功能（如果可用）。</span></p><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9YHhAIJFCExAsKUkE8IAFFPIDUIqhBRSDRBUqC%0ACimFFBCBpCWx02IaZ3G2SdyxPZ7vHh6+mcnSZnFjKIge6Wj8zYzvPf9z/me5d8TM+F8WfbkNuFx5%0ABcDLLf/fAEZGRmx4eNh6enqsp6fHhoeHbWRk5D9aFeSlVqHNmzfb6H33sHnT7ZQmD5GfOMax6Sm+%0APl5h1Yc+xpYtW2SBbX1ReUkRGBkZsdH77mHLW95EOv4Ms3ueJh6YYPHUFF9aljJ63z3cf//9/5FI%0AvKQIDA8P293L2yhVjjH7t51ocDiviFecF46n7XzBreChhx4qNhH5t0XjJUVgx44ddGUZ9b/vIpQD%0AoRQIWSDJAiFL6B9axo4dO4gxAmANWVDLG+Ln82URMRGhVCqRHxonlAPqFXWKC4r6IhI6OMjMzBN4%0A/4LlTUQQEZxzZ32QJAlpmrb+p16vU6vVOHXq1AW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M07mZ07d/KOtw1TcB4sGkTDiDQ9K1IkrKeYmQC08d7pZLSiRBpE5s7aS0XAHFEK%0AAGY51Wr18g80Zmb33nsvX/z8XdSmj2AWOXhwkrxe46+79jB55Dh/3T2GxUhHextdXW2sXN7PNWtW%0AIQKDA71FFBoAjIgQkVg/a5+oHrU5zIznDhxk964xKpXKggAoTlWW8+OfPorlOQ//cjsDy1bS2dFO%0AW+diVly1iL6+Pqanpzl5qsL4pPHwN3/G1InDlMsZ7Z1tDA30cfWqIa5dexV9fb2YnT7UTxw4xsHJ%0Ao4yOjfOP8QOMjx/k4OQx7r777lY0zycXvJ02M4sxMjg4SL1eR0TYsGEDw8PD9PX10d7ejogUN3a1%0AGqpKCIE8z5mdnUVVqVarbN++nba2Nvbu3csDDzyAqrJ8+atb+zjn6e/vZ/Xq1axatYq1a9fS29tL%0AlmUMDQ1RKpXOm9EXvV6v1+tWr9eZnp5mZmaGWq1GjLHF62aiNZ+bnPfe45xrvTZzxMyYmZk56+LX%0AzKjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"></th><th><span>Enabling SR-IOV 启用 SR-IOVTo use SR-IOV, platform support is especially important. It may be necessary to enable this feature in the BIOS/UEFI first, or to use a specific PCI(e) port for it to work. In doubt, consult the manual of the platform or contact its vendor. 要使用 SR-IOV，平台支持尤为重要。可能需要先在 BIOS/UEFI 中启用此功能，或者使用特定的 PCI（e） 端口使其工作。如有疑问，请参阅 Platform A手册或联系其供应商。</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><p><em><span>SR-IOV</span></em><span> (</span><strong><span>S</span></strong><span>ingle-</span><strong><span>R</span></strong><span>oot </span><strong><span>I</span></strong><span>nput/</span><strong><span>O</span></strong><span>utput </span><strong><span>V</span></strong><span>irtualization) enables a single device to provide multiple </span><em><span>VF</span></em><span> (</span><strong><span>V</span></strong><span>irtual </span><strong><span>F</span></strong><span>unctions) to the system. Each of those </span><em><span>VF</span></em><span> can be used in a different VM, with full hardware features and also better performance and lower latency than software virtualized devices.</span>
<em><span>SR-IOV</span></em><span>（</span><strong><span>S</span></strong><span>ingle-R oot </span><strong><span>I</span></strong><span>nput/</span><strong><span>O</span></strong><span>utput </span><strong><span>V</span></strong><span>irtualization）使单个设备能够向系统提供多个</span><em><span>VF</span></em><span>（</span><strong><span>V</span></strong><span>irtual </span><strong><span>F</span></strong><span>functions）。这些 </span><em><span>VF</span></em><span> 中的每一个都可以在不同的 VM 中使用，具有完整的硬件功能，并且与软件虚拟化设备相比，具有更好的性能和更低的延迟。</span></p><p><span>Currently, the most common use case for this are NICs (</span><strong><span>N</span></strong><span>etwork </span><strong><span>I</span></strong><span>nterface </span><strong><span>C</span></strong><span>ard) with SR-IOV support, which can provide multiple VFs per physical port. This allows using features such as checksum offloading, etc. to be used inside a VM, reducing the (host) CPU overhead.</span>
<span>目前，最常见的用例是具有 SR-IOV 支持的 NIC（</span><strong><span>N</span></strong><span>etwork </span><strong><span>I</span></strong><span>nterface </span><strong><span>C</span></strong><span>ard），它可以为每个物理端口提供多个 VF。这允许在虚拟机内部使用校验和卸载等功能，从而减少（主机）CPU 开销。</span></p><h4 id='host-configuration-主机配置-2'><span>Host Configuration 主机配置</span></h4><p><span>Generally, there are two methods for enabling virtual functions on a device.</span>
<span>通常，有两种方法可以在设备上启用虚拟功能。</span></p><ul><li><p><span>sometimes there is an option for the driver module e.g. for some Intel drivers</span>
<span>有时有一个驱动程序模块的选项，例如，对于某些英特尔驱动程序</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> max_vfs=4</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>which could be put file with </span><em><span>.conf</span></em><span> ending under </span><strong><span>/etc/modprobe.d/</span></strong><span>. (Do not forget to update your initramfs after that)</span>
<span>可以放入</span><em><span>以 .conf</span></em><span> 结尾的文件，结尾在 </span><strong><span>/etc/modprobe.d/</span></strong><span> 下。（之后不要忘记更新您的 initramfs）</span></p><p><span>Please refer to your driver module documentation for the exact parameters and options.</span>
<span>有关确切的参数和选项，请参阅您的驱动程序模块文档。</span></p></li><li><p><span>The second, more generic, approach is using the sysfs. If a device and driver supports this you can change the number of VFs on the fly. For example, to setup 4 VFs on device 0000:01:00.0 execute:</span>
<span>第二种更通用的方法是使用 sysfs。如果设备和驱动程序支持此功能，则可以动态更改 VF 的数量。例如，要在设备 0000：01：00.0 上设置 4 个 VF，请执行：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># echo 4 &gt; /sys/bus/pci/devices/0000:01:00.0/sriov_numvfs</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>To make this change persistent you can use the ‘sysfsutils</span><code>Debian package. After installation configure it via **/etc/sysfs.conf** or a</code><span>FILE.conf’ in </span><strong><span>/etc/sysfs.d/</span></strong><span>.</span>
<span>要使此更改持续存在，您可以使用 Debian 软件包“sysfsutils”。安装后，通过 </span><strong><span>/etc/sysfs.conf</span></strong><span> 或 </span><strong><span>/etc/sysfs.d/</span></strong><span> 中的 &#39;FILE.conf&#39; 进行配置。</span></p></li></ul><h4 id='vm-configuration-vm-配置-2'><span>VM Configuration VM 配置</span></h4><p><span>After creating VFs, you should see them as separate PCI(e) devices when outputting them with lspci. Get their ID and pass them through like a </span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_pci_passthrough_vm_config'><span>normal PCI(e) device</span></a><span>.</span>
<span>创建 VF 后，在使用 lspci 输出它们时，应将它们视为单独的 PCI（e） 设备。获取他们的 ID 并像</span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_pci_passthrough_vm_config'><span>普通的 PCI（e） 设备</span></a><span>一样传递它们。</span></p><h3 id='mediated-devices-vgpu-gvt-g-介导设备vgpugvt-g）'><span>Mediated Devices (vGPU, GVT-g) 介导设备（vGPU、GVT-g） </span></h3><p><span>Mediated devices are another method to reuse features and performance from physical hardware for virtualized hardware. These are found most common in virtualized GPU setups such as Intel’s GVT-g and NVIDIA’s vGPUs used in their GRID technology.</span>
<span>中介设备是将物理硬件的功能和性能重用用于虚拟化硬件的另一种方法。这些在虚拟化 GPU 设置中最常见，例如 Intel 的 GVT-g 和 NVIDIA 的 vGPU 在其 GRID 技术中使用。</span></p><p><span>With this, a physical Card is able to create virtual cards, similar to SR-IOV. The difference is that mediated devices do not appear as PCI(e) devices in the host, and are such only suited for using in virtual machines.</span>
<span>这样，物理卡就能够创建虚拟卡，类似于 SR-IOV。区别在于，中介设备在主机中不会显示为 PCI（e） 设备，而只适合在虚拟机中使用。</span></p><h4 id='host-configuration-主机配置-3'><span>Host Configuration 主机配置</span></h4><p><span>In general your card’s driver must support that feature, otherwise it will not work. So please refer to your vendor for compatible drivers and how to configure them.</span>
<span>通常，您的卡的驱动程序必须支持该功能，否则它将无法工作。因此，请咨询您的供应商，了解兼容的驱动程序以及如何配置它们。</span></p><p><span>Intel’s drivers for GVT-g are integrated in the Kernel and should work with 5th, 6th and 7th generation Intel Core Processors, as well as E3 v4, E3 v5 and E3 v6 Xeon Processors.</span>
<span>Intel 的 GVT-g 驱动程序集成在内核中，应与第 5、6 和 7 代 Intel Core 处理器以及 E3 v4、E3 v5 和 E3 v6 Xeon 处理器配合使用。</span></p><p><span>To enable it for Intel Graphics, you have to make sure to load the module </span><em><span>kvmgt</span></em><span> (for example via /etc/modules) and to enable it on the Kernel commandline and add the following parameter:</span>
<span>要为 Intel Graphics 启用它，您必须确保加载模块 </span><em><span>kvmgt</span></em><span>（例如通过 /etc/modules），并在内核命令行上启用它并添加以下参数：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> i915.enable_gvt=1</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>After that remember to </span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_pci_passthrough_update_initramfs'><span>update the initramfs</span></a><span>, and reboot your host.</span>
<span>之后</span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_pci_passthrough_update_initramfs'><span>，请记住更新 initramfs</span></a><span>，并重新启动您的主机。</span></p><h4 id='vm-configuration-vm-配置-3'><span>VM Configuration VM 配置</span></h4><p><span>To use a mediated device, simply specify the mdev property on a hostpciX VM configuration option.</span>
<span>要使用中介设备，只需在 hostpciX VM 配置选项上指定 mdev 属性。</span></p><p><span>You can get the supported devices via the </span><em><span>sysfs</span></em><span>. For example, to list the supported types for the device </span><em><span>0000:00:02.0</span></em><span> you would simply execute:</span>
<span>您可以通过 </span><em><span>sysfs</span></em><span> 获取受支持的设备。例如，要列出设备 </span><em><span>0000：00：02.0</span></em><span> 支持的类型，您只需执行：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># ls /sys/bus/pci/devices/0000:00:02.0/mdev_supported_types</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>Each entry is a directory which contains the following important files:</span>
<span>每个条目都是一个目录，其中包含以下重要文件：</span></p><ul><li><p><em><span>available_instances</span></em><span> contains the amount of still available instances of this type, each </span><em><span>mdev</span></em><span> use in a VM reduces this.</span>
<em><span>available_instances</span></em><span>包含此类型的仍然可用的实例数量，则在 VM 中使用每个 </span><em><span>mdev</span></em><span> 都会减少此数量。</span></p></li><li><p><em><span>description</span></em><span> contains a short description about the capabilities of the type</span>
<em><span>Description</span></em><span> 包含有关该类型功能的简短说明</span></p></li><li><p><em><span>create</span></em><span> is the endpoint to create such a device, Proxmox VE does this automatically for you, if a </span><em><span>hostpciX</span></em><span> option with mdev is configured.</span>
<em><span>create</span></em><span> 是创建此类设备的端点，如果配置了带有 mdev 的 </span><em><span>hostpciX</span></em><span> 选项，Proxmox VE 会自动为您执行此操作。</span></p></li></ul><p><span>Example configuration with an Intel GVT-g vGPU (Intel Skylake 6700k):</span>
<span>Intel GVT-g vGPU （Intel Skylake 6700k） 的配置示例：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm set VMID -hostpci0 00:02.0,mdev=i915-GVTg_V5_4</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>With this set, Proxmox VE automatically creates such a device on VM start, and cleans it up again when the VM stops.</span>
<span>使用此设置，Proxmox VE会在VM启动时自动创建此类设备，并在VM停止时再次清理它。</span></p><h3 id='use-in-clusters-在集群中使用'><span>Use in Clusters 在集群中使用 </span></h3><p><span>It is also possible to map devices on a cluster level, so that they can be properly used with HA and hardware changes are detected and non root users can configure them. See </span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#resource_mapping'><span>Resource Mapping</span></a><span> for details on that.</span>
<span>还可以在集群级别映射设备，以便它们可以与 HA 正确使用，并且检测到硬件更改，并且非 root 用户可以配置它们。有关详细信息，请参阅</span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#resource_mapping'><span>资源映射</span></a><span>。</span></p><h3 id='viommu-emulated-iommu-viommu模拟-iommu）'><span>vIOMMU (emulated IOMMU) vIOMMU（模拟 IOMMU） </span></h3><p><span>vIOMMU is the emulation of a hardware IOMMU within a virtual machine, providing improved memory access control and security for virtualized I/O devices. Using the vIOMMU option also allows you to pass through PCI(e) devices to level-2 VMs in level-1 VMs via </span><a href='https://pve.proxmox.com/wiki/Nested_Virtualization'><span>Nested Virtualization</span></a><span>. To pass through physical PCI(e) devices from the host to nested VMs, follow the PCI(e) passthrough instructions.</span>
<span>vIOMMU 是在虚拟机中模拟硬件 IOMMU，为虚拟化 I/O 设备提供改进的内存访问控制和安全性。使用 vIOMMU 选项还允许您通过</span><a href='https://pve.proxmox.com/wiki/Nested_Virtualization'><span>嵌套虚拟化</span></a><span>将 PCI（e） 设备传递到 1 级 VM 中的 2 级 VM。要将物理 PCI（e） 设备从主机传递到嵌套 VM，请按照 PCI（e） 直通说明进行操作。</span></p><p><span>There are currently two vIOMMU implementations available: Intel and VirtIO.</span>
<span>目前有两种 vIOMMU 实现可用：Intel 和 VirtIO。</span></p><h4 id='intel-viommu-英特尔-viommu'><span>Intel vIOMMU 英特尔 vIOMMU</span></h4><p><span>Intel vIOMMU specific VM requirements:</span>
<span>特定于 Intel vIOMMU 的 VM 要求：</span></p><ul><li><p><span>Whether you are using an Intel or AMD CPU on your host, it is important to set intel_iommu=on in the VMs kernel parameters.</span>
<span>无论在主机上使用 Intel 还是 AMD CPU，都必须在 VM 内核参数中设置 intel_iommu=on。</span></p></li><li><p><span>To use Intel vIOMMU you need to set </span><strong><span>q35</span></strong><span> as the machine type.</span>
<span>要使用 Intel vIOMMU，您需要将 </span><strong><span>q35</span></strong><span> 设置为机器类型。</span></p></li></ul><p><span>If all requirements are met, you can add viommu=intel to the machine parameter in the configuration of the VM that should be able to pass through PCI devices.</span>
<span>如果满足所有要求，则可以在应该能够通过 PCI 设备的 VM 配置中的计算机参数中添加 viommu=intel。</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm set VMID -machine q35,viommu=intel</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><a href='https://wiki.qemu.org/Features/VT-d'><span>QEMU documentation for VT-d</span>
<span>VT-d 的 QEMU 文档</span></a></p><h4 id='virtio-viommu'><span>VirtIO vIOMMU </span></h4><p><span>This vIOMMU implementation is more recent and does not have as many limitations as Intel vIOMMU but is currently less used in production and less documentated.</span>
<span>此 vIOMMU 实现是较新的，没有英特尔 vIOMMU 那么多的限制，但目前在生产中使用较少，文档也较少。</span></p><p><span>With VirtIO vIOMMU there is </span><strong><span>no</span></strong><span> need to set any kernel parameters. It is also </span><strong><span>not</span></strong><span> necessary to use q35 as the machine type, but it is advisable if you want to use PCIe.</span>
<span>使用 VirtIO vIOMMU，</span><strong><span>无需</span></strong><span>设置任何内核参数。也</span><strong><span>不必</span></strong><span>使用 q35 作为机器类型，但如果您想使用 PCIe，建议这样做。</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm set VMID -machine q35,viommu=virtio</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><a href='https://web.archive.org/web/20230804075844/https://michael2012z.medium.com/virtio-iommu-789369049443'><span>Blog-Post by Michael Zhao explaining virtio-iommu</span>
<span>Michael Zhao 解释 virtio-iommu 的博客文章</span></a></p><h2 id='hookscripts-钩子脚本'><span>Hookscripts 钩子脚本</span></h2><p><span>You can add a hook script to VMs with the config property hookscript.</span>
<span>您可以使用配置属性 hookscript 向 VM 添加钩子脚本。</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm set 100 --hookscript local:snippets/hookscript.pl</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>It will be called during various phases of the guests lifetime. For an example and documentation see the example script under /usr/share/pve-docs/examples/guest-example-hookscript.pl.</span>
<span>它将在客人生命周期的各个阶段被调用。有关示例和文档，请参阅 /usr/share/pve-docs/examples/guest-example-hookscript.pl 下的示例脚本。</span></p><h2 id='hibernation-冬眠'><span>Hibernation 冬眠</span></h2><p><span>You can suspend a VM to disk with the GUI option Hibernate or with</span>
<span>您可以使用 GUI 选项 Hibernate 或</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm suspend ID --todisk</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>That means that the current content of the memory will be saved onto disk and the VM gets stopped. On the next start, the memory content will be loaded and the VM can continue where it was left off.</span>
<span>这意味着内存的当前内容将保存到磁盘上，并且 VM 将停止。下次启动时，将加载内存内容，并且 VM 可以从中断的位置继续。</span></p><p><span>State storage selection 状态存储选择</span></p><p><span>If no target storage for the memory is given, it will be automatically chosen, the first of:</span>
<span>如果没有为内存提供目标存储，则将自动选择以下第一个存储：</span></p><ol><li><p><span>The storage vmstatestorage from the VM config.</span>
<span>虚拟机配置中的存储 vmstatestorage 。</span></p></li><li><p><span>The first shared storage from any VM disk.</span>
<span>来自任何 VM 磁盘的第一个共享存储。</span></p></li><li><p><span>The first non-shared storage from any VM disk.</span>
<span>任何 VM 磁盘中的第一个非共享存储。</span></p></li><li><p><span>The storage local as a fallback.</span>
<span>本地存储作为回退。</span></p></li></ol><h2 id='resource-mapping-资源映射'><span>Resource Mapping 资源映射</span></h2><p><a href='https://pve.proxmox.com/pve-docs/images/screenshot/gui-datacenter-resource-mappings.png'><img src="https://pve.proxmox.com/pve-docs/images/screenshot/gui-datacenter-resource-mappings.png" referrerpolicy="no-referrer" alt="screenshot/gui-datacenter-resource-mappings.png"></a></p><p><span>When using or referencing local resources (e.g. address of a pci device), using the raw address or id is sometimes problematic, for example:</span>
<span>使用或引用本地资源（例如 pci 设备的地址）时，使用原始地址或 id 有时会出现问题，例如：</span></p><ul><li><p><span>when using HA, a different device with the same id or path may exist on the target node, and if one is not careful when assigning such guests to HA groups, the wrong device could be used, breaking configurations.</span>
<span>使用 HA 时，目标节点上可能存在具有相同 ID 或路径的不同设备，如果在将此类客户机分配给 HA 组时不小心，则可能会使用错误的设备，从而破坏配置。</span></p></li><li><p><span>changing hardware can change ids and paths, so one would have to check all assigned devices and see if the path or id is still correct.</span>
<span>更改硬件可能会更改 ID 和路径，因此必须检查所有分配的设备，并查看路径或 ID 是否仍然正确。</span></p></li></ul><p><span>To handle this better, one can define cluster wide resource mappings, such that a resource has a cluster unique, user selected identifier which can correspond to different devices on different hosts. With this, HA won’t start a guest with a wrong device, and hardware changes can be detected.</span>
<span>为了更好地处理这个问题，可以定义集群范围的资源映射，这样资源就具有集群唯一的用户选择的标识符，该标识符可以对应于不同主机上的不同设备。这样，HA 就不会使用错误的设备启动客户机，并且可以检测到硬件更改。</span></p><p><span>Creating such a mapping can be done with the Proxmox VE web GUI under Datacenter in the relevant tab in the Resource Mappings category, or on the cli with</span>
<span>可以使用 Proxmox VE web GUI 在“资源映射”类别的相关选项卡中的“数据中心”下创建此类映射，或使用 CLI 创建此类映射</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># pvesh create /cluster/mapping/&lt;type&gt; &lt;options&gt;</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><a href='https://pve.proxmox.com/pve-docs/images/screenshot/gui-datacenter-mapping-pci-edit.png'><img src="https://pve.proxmox.com/pve-docs/images/screenshot/gui-datacenter-mapping-pci-edit.png" referrerpolicy="no-referrer" alt="screenshot/gui-datacenter-mapping-pci-edit.png"></a></p><p><span>Where </span><type><span> is the hardware type (currently either pci or usb) and </span><options><span> are the device mappings and other configuration parameters.</span>
<span>其中 </span><type><span> 是硬件类型（当前为 pci 或 usb），</span><options><span> 是设备映射和其他配置参数。</span></p><p><span>Note that the options must include a map property with all identifying properties of that hardware, so that it’s possible to verify the hardware did not change and the correct device is passed through.</span>
<span>请注意，选项必须包含具有该硬件的所有标识属性的 map 属性，以便可以验证硬件是否未更改以及是否传递了正确的设备。</span></p><p><span>For example to add a PCI device as device1 with the path 0000:01:00.0 that has the device id 0001 and the vendor id 0002 on the node node1, and 0000:02:00.0 on node2 you can add it with:</span>
<span>例如，要将 PCI 设备添加为 device1，路径为 0000：01：00.0，节点 node1 上的设备 ID 为 0001 且供应商 ID 为 0002，节点 2 上的路径为 0000：02：00.0，您可以使用以下命令添加它：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># pvesh create /cluster/mapping/pci --id device1 \</span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> --map node=node1,path=0000:01:00.0,id=0002:0001 \</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> --map node=node2,path=0000:02:00.0,id=0002:0001</span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 78px;"></div><div class="CodeMirror-gutters" style="display: none; height: 78px;"></div></div></div></pre><p><span>You must repeat the map parameter for each node where that device should have a mapping (note that you can currently only map one USB device per node per mapping).</span>
<span>您必须对该设备应具有映射的每个节点重复 map 参数（请注意，您目前只能为每个映射的每个节点映射一个 USB 设备）。</span></p><p><span>Using the GUI makes this much easier, as the correct properties are automatically picked up and sent to the API.</span>
<span>使用 GUI 可以更轻松地进行操作，因为会自动获取正确的属性并将其发送到 API。</span></p><p><a href='https://pve.proxmox.com/pve-docs/images/screenshot/gui-datacenter-mapping-usb-edit.png'><img src="https://pve.proxmox.com/pve-docs/images/screenshot/gui-datacenter-mapping-usb-edit.png" referrerpolicy="no-referrer" alt="screenshot/gui-datacenter-mapping-usb-edit.png"></a></p><p><span>It’s also possible for PCI devices to provide multiple devices per node with multiple map properties for the nodes. If such a device is assigned to a guest, the first free one will be used when the guest is started. The order of the paths given is also the order in which they are tried, so arbitrary allocation policies can be implemented.</span>
<span>PCI 设备也可以为每个节点提供多个设备，并为节点提供多个映射属性。如果将此类设备分配给客户机，则在启动客户机时将使用第一个空闲设备。给定路径的顺序也是尝试路径的顺序，因此可以实现任意分配策略。</span></p><p><span>This is useful for devices with SR-IOV, since some times it is not important which exact virtual function is passed through.</span>
<span>这对于具有 SR-IOV 的设备很有用，因为有时通过哪个确切的虚拟功能并不重要。</span></p><p><span>You can assign such a device to a guest either with the GUI or with</span>
<span>您可以使用 GUI 或</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm set ID -hostpci0 &lt;name&gt;</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>for PCI devices, or 对于 PCI 设备，或者</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm set &lt;vmid&gt; -usb0 &lt;name&gt;</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>for USB devices. 用于 USB 设备。</span></p><p><span>Where </span><vmid><span> is the guests id and </span><name><span> is the chosen name for the created mapping. All usual options for passing through the devices are allowed, such as mdev.</span>
<span>其中 </span><vmid><span> 是来宾 ID，</span><name><span> 是为创建的映射选择的名称。允许使用所有常用的方法来传递设备，例如 mdev。</span></p><p><span>To create mappings Mapping.Modify on /mapping/</span><type><span>/</span><name><span> is necessary (where </span><type><span> is the device type and </span><name><span> is the name of the mapping).</span>
<span>若要创建映射，需要对 /mapping/</span><type><span>/</span><name><span> 进行 Mapping.Moedit（其中 </span><type><span> 是设备类型，</span><name><span> 是映射的名称）。</span></p><p><span>To use these mappings, Mapping.Use on /mapping/</span><type><span>/</span><name><span> is necessary (in addition to the normal guest privileges to edit the configuration).</span>
<span>要使用这些映射，除了编辑配置的正常客户机权限外，还需要对 /mapping/</span><type><span>/</span><name><span> 进行 Mapping.Use 操作。</span></p><h2 id='managing-virtual-machines-with-qm-使用-qm-管理虚拟机'><span>Managing Virtual Machines with qm 使用 qm 管理虚拟机 </span></h2><p><span>qm is the tool to manage QEMU/KVM virtual machines on Proxmox VE. You can create and destroy virtual machines, and control execution (start/stop/suspend/resume). Besides that, you can use qm to set parameters in the associated config file. It is also possible to create and delete virtual disks.</span>
<span>qm 是在 Proxmox VE 上管理 QEMU/KVM 虚拟机的工具。您可以创建和销毁虚拟机，并控制执行（启动/停止/挂起/恢复）。除此之外，您还可以使用 qm 在关联的配置文件中设置参数。还可以创建和删除虚拟磁盘。</span></p><h3 id='cli-usage-examples-cli-使用示例'><span>CLI Usage Examples CLI 使用示例 </span></h3><p><span>Using an iso file uploaded on the </span><em><span>local</span></em><span> storage, create a VM with a 4 GB IDE disk on the </span><em><span>local-lvm</span></em><span> storage</span>
<span>使用上传到</span><em><span>本地</span></em><span>存储的 iso 文件，在 </span><em><span>local-lvm</span></em><span> 存储上创建具有 4 GB IDE 磁盘的 VM</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm create 300 -ide0 local-lvm:4 -net0 e1000 -cdrom local:iso/proxmox-mailgateway_2.1.iso</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 52px;"></div><div class="CodeMirror-gutters" style="display: none; height: 52px;"></div></div></div></pre><p><span>Start the new VM 启动新 VM</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm start 300</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>Send a shutdown request, then wait until the VM is stopped.</span>
<span>发送关机请求，然后等待 VM 停止。</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm shutdown 300 &amp;&amp; qm wait 300</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>Same as above, but only wait for 40 seconds.</span>
<span>与上述相同，但仅等待 40 秒。</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm shutdown 300 &amp;&amp; qm wait 300 -timeout 40</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>If the VM does not shut down, force-stop it and overrule any running shutdown tasks. As stopping VMs may incur data loss, use it with caution.</span>
<span>如果 VM 未关闭，请强制停止它并否决任何正在运行的关闭任务。由于停止虚拟机可能会导致数据丢失，因此请谨慎使用。</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm stop 300 -overrule-shutdown 1</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>Destroying a VM always removes it from Access Control Lists and it always removes the firewall configuration of the VM. You have to activate </span><em><span>--purge</span></em><span>, if you want to additionally remove the VM from replication jobs, backup jobs and HA resource configurations.</span>
<span>销毁 VM 始终会将其从访问控制列表中删除，并且始终会删除 VM 的防火墙配置。如果要从复制作业、备份作业和 HA 资源配置中额外删除 VM，则必须激活 </span><em><span>--purge</span></em><span>。</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm destroy 300 --purge</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>Move a disk image to a different storage.</span>
<span>将磁盘映像移动到其他存储器。</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm move-disk 300 scsi0 other-storage</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>Reassign a disk image to a different VM. This will remove the disk scsi1 from the source VM and attaches it as scsi3 to the target VM. In the background the disk image is being renamed so that the name matches the new owner.</span>
<span>将磁盘映像重新分配给其他 VM。这会从源 VM 中删除磁盘 scsi1，并将其作为 scsi3 连接到目标 VM。在后台，正在重命名磁盘映像，以便名称与新所有者匹配。</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm move-disk 300 scsi1 --target-vmid 400 --target-disk scsi3</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><h2 id='configuration-配置-2'><span>Configuration 配置</span></h2><p><span>VM configuration files are stored inside the Proxmox cluster file system, and can be accessed at /etc/pve/qemu-server/</span><VMID><span>.conf. Like other files stored inside /etc/pve/, they get automatically replicated to all other cluster nodes.</span>
<span>虚拟机配置文件存储在 Proxmox 集群文件系统中，可以在 /etc/pve/qemu-server/</span><VMID><span>.conf 中访问。就像存储在 /etc/pve/ 中的其他文件一样，它们会自动复制到所有其他集群节点。</span></p><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9YHhAIJFCExAsKUkE8IAFFPIDUIqhBRSDRBUqC%0ACimFFBCBpCWx02IaZ3G2SdyxPZ7vHh6+mcnSZnFjKIge6Wj8zYzvPf9z/me5d8TM+F8WfbkNuFx5%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served for internal purposes, and VMIDs need to be unique cluster wide. &lt; 100 个 VMID 保留用于内部用途，并且 VMID 需要在集群范围内是唯一的。</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><p><span>Example VM Configuration 示例 VM 配置</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation" style=""><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">boot: order=virtio0;net0</span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">cores: 1</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">sockets: 1</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">memory: 512</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">name: webmail</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">ostype: l26</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">net0: e1000=EE:D2:28:5F:B6:3E,bridge=vmbr0</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">virtio0: local:vm-100-disk-1,size=32G</span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 208px;"></div><div class="CodeMirror-gutters" style="display: none; height: 208px;"></div></div></div></pre><p><span>Those configuration files are simple text files, and you can edit them using a normal text editor (vi, nano, …). This is sometimes useful to do small corrections, but keep in mind that you need to restart the VM to apply such changes.</span>
<span>这些配置文件是简单的文本文件，您可以使用普通的文本编辑器（vi、nano 等）来编辑它们。这有时对于进行小的更正很有用，但请记住，您需要重新启动 VM 才能应用此类更改。</span></p><p><span>For that reason, it is usually better to use the qm command to generate and modify those files, or do the whole thing using the GUI. Our toolkit is smart enough to instantaneously apply most changes to running VM. This feature is called &quot;hot plug&quot;, and there is no need to restart the VM in that case.</span>
<span>出于这个原因，通常最好使用 qm 命令来生成和修改这些文件，或者使用 GUI 来执行整个操作。我们的工具包足够智能，可以立即将大多数更改应用于正在运行的虚拟机。此功能称为“热插拔”，在这种情况下，无需重新启动 VM。</span></p><h3 id='file-format-文件格式'><span>File Format 文件格式 </span></h3><p><span>VM configuration files use a simple colon separated key/value format. Each line has the following format:</span>
<span>VM 配置文件使用简单的冒号分隔键/值格式。每行都有以下格式：</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># this is a comment</span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">OPTION: value</span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 52px;"></div><div class="CodeMirror-gutters" style="display: none; height: 52px;"></div></div></div></pre><p><span>Blank lines in those files are ignored, and lines starting with a # character are treated as comments and are also ignored.</span>
<span>这些文件中的空行将被忽略，以 # 字符开头的行将被视为注释，并且也会被忽略。</span></p><h3 id='snapshots-快照'><span>Snapshots 快照 </span></h3><p><span>When you create a snapshot, qm stores the configuration at snapshot time into a separate snapshot section within the same configuration file. For example, after creating a snapshot called “testsnapshot”, your configuration file will look like this:</span>
<span>当您创建快照时，qm 会在快照时将配置存储到同一配置文件中的单独快照部分。例如，在创建名为“testsnapshot”的快照后，您的配置文件将如下所示：</span></p><p><span>VM configuration with snapshot</span>
<span>带快照的 VM 配置</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation" style=""><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">memory: 512</span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">swap: 512</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">parent: testsnaphot</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">...</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text="" cm-zwsp="">
</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">[testsnaphot]</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">memory: 512</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">swap: 512</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">snaptime: 1457170803</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">...</span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 260px;"></div><div class="CodeMirror-gutters" style="display: none; height: 260px;"></div></div></div></pre><p><span>There are a few snapshot related properties like parent and snaptime. The parent property is used to store the parent/child relationship between snapshots. snaptime is the snapshot creation time stamp (Unix epoch).</span>
<span>有一些与快照相关的属性，如父和 snaptime。parent 属性用于存储快照之间的父/子关系。snaptime 是快照创建时间戳（Unix 纪元）。</span></p><p><span>You can optionally save the memory of a running VM with the option vmstate. For details about how the target storage gets chosen for the VM state, see </span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_vmstatestorage'><span>State storage selection</span></a><span> in the chapter </span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_hibernate'><span>Hibernation</span></a><span>.</span>
<span>您可以选择使用选项 vmstate 保存正在运行的 VM 的内存。有关如何为 VM 状态选择目标存储的详细信息，请参阅</span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_hibernate'><span>休眠</span></a><span>一章中的</span><a href='https://pve.proxmox.com/pve-docs/qm.1.html#qm_vmstatestorage'><span>状态存储选择</span></a><span>。</span></p><h3 id='options-选项'><span>Options 选项 </span></h3><ul><li><p><span>acpi: </span><boolean><span> (</span><em><span>default =</span></em><span> 1) acpi： </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>Enable/disable ACPI. 启用/禁用 ACPI。</span></p></li><li><p><span>affinity: </span><string><span> 亲和力： </span><string></p><p><span>List of host cores used to execute guest processes, for example: 0,5,8-11 用于执行客户机进程的主机核心列表，例如：0,5,8-11</span></p></li><li><p><span>agent: [enabled=]&lt;1|0&gt; [,freeze-fs-on-backup=&lt;1|0&gt;] [,fstrim_cloned_disks=&lt;1|0&gt;] [,type=&lt;virtio|isa&gt;] 代理：[enabled=]&lt;1|0&gt; [，freeze-fs-on-backup=&lt;1|0&gt;] [，fstrim_cloned_disks=&lt;1|0&gt;] [，type=&lt;virtio|isa&gt;]</span></p><p><span>Enable/disable communication with the QEMU Guest Agent and its properties. 启用/禁用与 QEMU Guest Agent 及其属性的通信。enabled=</span><boolean><span> (</span><em><span>default =</span></em><span> 0) enabled=</span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）Enable/disable communication with a QEMU Guest Agent (QGA) running in the VM. 启用/禁用与 VM 中运行的 QEMU 客户机代理 （QGA） 的通信。freeze-fs-on-backup=</span><boolean><span> (</span><em><span>default =</span></em><span> 1) freeze-fs-on-backup=</span><boolean><span>（</span><em><span>默认值 =</span></em><span> 1）Freeze/thaw guest filesystems on backup for consistency. 在备份上冻结/解冻客户机文件系统以确保一致性。fstrim_cloned_disks=</span><boolean><span> (</span><em><span>default =</span></em><span> 0) fstrim_cloned_disks=</span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）Run fstrim after moving a disk or migrating the VM. 移动磁盘或迁移 VM 后运行 fstrim。type=&lt;isa | virtio&gt; (</span><em><span>default =</span></em><span> virtio) type=&lt;isa | virtio&gt; （</span><em><span>默认值 =</span></em><span> virtio）Select the agent type 选择代理类型</span></p></li><li><p><span>arch: &lt;aarch64 | x86_64&gt; 拱： &lt;aarch64 | x86_64&gt;</span></p><p><span>Virtual processor architecture. Defaults to the host. 虚拟处理器体系结构。默认为主机。</span></p></li><li><p><span>args: </span><string><span> 参数： </span><string></p><p><span>Arbitrary arguments passed to kvm, for example: 传递给 kvm 的任意参数，例如：args: -no-reboot -smbios </span><em><span>type=0,vendor=FOO</span></em><span> 参数：-no-reboot -smbios </span><em><span>type=0，vendor=FOO</span></em><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9YHhAIJFCExAsKUkE8IA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0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"><span>this option is for experts only. 此选项仅适用于专家。</span></p></li><li><p><span>audio0: device=&lt;ich9-intel-hda|intel-hda|AC97&gt; [,driver=&lt;spice|none&gt;] audio0： device=&lt;ich9-intel-had|intel-had|AC97&gt; [，驱动程序=&lt;spice|none&gt;]</span></p><p><span>Configure a audio device, useful in combination with QXL/Spice. 配置音频设备，与 QXL/Spice 结合使用很有用。device=&lt;AC97 | ich9-intel-hda | intel-hda&gt; device=&lt;AC97 | ich9-intel-had | intel-had&gt;Configure an audio device. 配置音频设备。driver=&lt;none | spice&gt; (</span><em><span>default =</span></em><span> spice) driver=&lt;none | spice&gt;（</span><em><span>默认值 =</span></em><span> spice）Driver backend for the audio device. 音频设备的驱动程序后端。</span></p></li><li><p><span>autostart: </span><boolean><span> (</span><em><span>default =</span></em><span> 0) autostart： </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Automatic restart after crash (currently ignored). 崩溃后自动重启（当前忽略）。</span></p></li><li><p><span>balloon: </span><integer><span> (0 - N) 气球： </span><integer><span> （0 - N）</span></p><p><span>Amount of target RAM for the VM in MiB. Using zero disables the ballon driver. VM 的目标 RAM 量（以 MiB 为单位）。使用零将禁用气球驱动器。</span></p></li><li><p><span>bios: &lt;ovmf | seabios&gt; (</span><em><span>default =</span></em><span> seabios) bios： &lt;ovmf | seabios&gt; （</span><em><span>默认值 =</span></em><span> seabios）</span></p><p><span>Select BIOS implementation. 选择 BIOS 实现。</span></p></li><li><p><span>boot: [[legacy=]&lt;[acdn]{1,4}&gt;] [,order=&lt;device[;device...]&gt;] boot： [[legacy=]&lt;[acdn]{1,4}&gt;] [，order=&lt;device[;设备...]&gt;]</span></p><p><span>Specify guest boot order. Use the </span><em><span>order=</span></em><span> sub-property as usage with no key or </span><em><span>legacy=</span></em><span> is deprecated. 指定客户机启动顺序。使用 </span><em><span>order=</span></em><span> 子属性，因为不带键或 </span><em><span>legacy=</span></em><span> 的用法已弃用。legacy=&lt;[acdn]{1,4}&gt; (</span><em><span>default =</span></em><span> cdn) legacy=&lt;[acdn]{1,4}&gt; （</span><em><span>默认值 =</span></em><span> cdn）Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n). Deprecated, use </span><em><span>order=</span></em><span> instead. 在软盘 （a）、硬盘 （c）、CD-ROM （d） 或网络 （n） 上启动。已弃用，请改用 </span><em><span>order=</span></em><span>。order=&lt;device[;device...]&gt; 订单=&lt;device[;设备...]&gt;The guest will attempt to boot from devices in the order they appear here. 客户机将尝试按照设备在此处显示的顺序从设备启动。Disks, optical drives and passed-through storage USB devices will be directly booted from, NICs will load PXE, and PCIe devices will either behave like disks (e.g. NVMe) or load an option ROM (e.g. RAID controller, hardware NIC). 磁盘、光驱和直通存储 USB 设备将直接从中启动，NIC 将加载 PXE，而 PCIe 设备将表现得像磁盘（例如 NVMe）或加载选项 ROM（例如 RAID 控制器、硬件 NIC）。Note that only devices in this list will be marked as bootable and thus loaded by the guest firmware (BIOS/UEFI). If you require multiple disks for booting (e.g. software-raid), you need to specify all of them here. 请注意，只有此列表中的设备才会被标记为可启动，从而由客户机固件 （BIOS/UEFI） 加载。如果需要多个磁盘进行启动（例如 software-raid），则需要在此处指定所有磁盘。Overrides the deprecated *legacy=[acdn]** value when given. 在给定时覆盖已弃用的 *Legacy=[acdn]** 值。</span></p></li><li><p><span>bootdisk: (ide|sata|scsi|virtio)\d+ 启动盘：（IDE|SATA|SCSI|virtio）\d+</span></p><p><span>Enable booting from specified disk. Deprecated: Use </span><em><span>boot: order=foo;bar</span></em><span> instead. 启用从指定磁盘启动。已弃用：使用 </span><em><span>boot： order=foo;条</span></em><span>形图。</span></p></li><li><p><span>cdrom: </span><volume><span> cdrom： &lt;卷&gt;</span></p><p><span>This is an alias for option -ide2 这是选项 -ide2 的别名</span></p></li><li><p><span>cicustom: [meta=</span><volume><span>] [,network=</span><volume><span>] [,user=</span><volume><span>] [,vendor=</span><volume><span>] cicustom： [meta=</span><volume><span>] [，network=</span><volume><span>] [，user=</span><volume><span>] [，vendor=</span><volume><span>]</span></p><p><span>cloud-init: Specify custom files to replace the automatically generated ones at start. cloud-init：指定自定义文件以替换开始时自动生成的文件。meta=</span><volume><span> 元=&lt;体积&gt;Specify a custom file containing all meta data passed to the VM via&quot; .&quot; cloud-init. This is provider specific meaning configdrive2 and nocloud differ. 指定一个自定义文件，其中包含通过“ .” cloud-init传递到VM的所有元数据。这是特定于提供商的，这意味着 configdrive2 和 nocloud 不同。network=</span><volume><span> 网络=&lt;卷&gt;To pass a custom file containing all network data to the VM via cloud-init. 通过 cloud-init 将包含所有网络数据的自定义文件传递给 VM。user=</span><volume><span> 用户=&lt;音量&gt;To pass a custom file containing all user data to the VM via cloud-init. 通过 cloud-init 将包含所有用户数据的自定义文件传递给 VM。vendor=</span><volume><span>To pass a custom file containing all vendor data to the VM via cloud-init. 通过 cloud-init 将包含所有供应商数据的自定义文件传递给 VM。</span></p></li><li><p><span>cipassword: </span><string><span> cipassword： </span><string></p><p><span>cloud-init: Password to assign the user. Using this is generally not recommended. Use ssh keys instead. Also note that older cloud-init versions do not support hashed passwords. cloud-init：用于分配用户的密码。通常不建议使用此工具。请改用 ssh 密钥。另请注意，较旧的 cloud-init 版本不支持哈希密码。</span></p></li><li><p><span>citype: &lt;configdrive2 | nocloud | opennebula&gt; citype： &lt;configdrive2 | nocloud | opennebula&gt;</span></p><p><span>Specifies the cloud-init configuration format. The default depends on the configured operating system type (ostype. We use the nocloud format for Linux, and configdrive2 for windows. 指定 cloud-init 配置格式。默认值取决于配置的操作系统类型 （ostype.我们对 Linux 使用 nocloud 格式，对 Windows 使用 configdrive2 格式。</span></p></li><li><p><span>ciupgrade: </span><boolean><span> (</span><em><span>default =</span></em><span> 1) ciupgrade： </span><boolean><span> （</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>cloud-init: do an automatic package upgrade after the first boot. cloud-init：首次启动后自动升级包。</span></p></li><li><p><span>ciuser: </span><string><span> ciuser： </span><string></p><p><span>cloud-init: User name to change ssh keys and password for instead of the image’s configured default user. cloud-init：用于更改 ssh 密钥和密码的用户名，而不是镜像配置的默认用户。</span></p></li><li><p><span>cores: </span><integer><span> (1 - N) (</span><em><span>default =</span></em><span> 1) 核心数： </span><integer><span> （1 - N） （</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>The number of cores per socket. 每个插槽的核心数。</span></p></li><li><p><span>cpu: [[cputype=]</span><string><span>] [,flags=&lt;+FLAG[;-FLAG...]&gt;] [,hidden=&lt;1|0&gt;] [,hv-vendor-id=</span><vendor-id><span>] [,phys-bits=&lt;8-64|host&gt;] [,reported-model=</span><enum><span>] 中央处理器： [[cputype=]</span><string><span>] [，flags=&lt;+FLAG[;-FLAG...]&gt;] [，hidden=&lt;1|0&gt;] [，hv-vendor-id=</span><vendor-id><span>] [，phys-bits=&lt;8-64|host&gt;] [，reported-model=</span><enum><span>]</span></p><p><span>Emulated CPU type. 模拟 CPU 类型。cputype=</span><string><span> (</span><em><span>default =</span></em><span> kvm64) cputype=</span><string><span>（</span><em><span>默认值 =</span></em><span> kvm64）Emulated CPU type. Can be default or custom name (custom model names must be prefixed with </span><em><span>custom-</span></em><span>). 模拟 CPU 类型。可以是默认名称或自定义名称（自定义模型名称必须以 </span><em><span>custom-</span></em><span> 为前缀）。flags=&lt;+FLAG[;-FLAG...]&gt;List of additional CPU flags separated by </span><em><span>;</span></em><span>. Use </span><em><span>+FLAG</span></em><span> to enable, </span><em><span>-FLAG</span></em><span> to disable a flag. Custom CPU models can specify any flag supported by QEMU/KVM, VM-specific flags must be from the following set for security reasons: pcid, spec-ctrl, ibpb, ssbd, virt-ssbd, amd-ssbd, amd-no-ssb, pdpe1gb, md-clear, hv-tlbflush, hv-evmcs, aes 用 </span><em><span>;</span></em><span>分隔的其他 CPU 标志列表。使用 </span><em><span>+FLAG</span></em><span> 启用，使用 </span><em><span>-FLAG</span></em><span> 禁用标志。自定义 CPU 模型可以指定 QEMU/KVM 支持的任何标志，出于安全原因，特定于 VM 的标志必须来自以下集：pcid、spec-ctrl、ibpb、ssbd、virt-ssbd、amd-ssbd、amd-no-ssb、pdpe1gb、md-clear、hv-tlbflush、hv-evmcs、aeshidden=</span><boolean><span> (</span><em><span>default =</span></em><span> 0) hidden=</span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）Do not identify as a KVM virtual machine. 不要标识为 KVM 虚拟机。hv-vendor-id=</span><vendor-id><span> hv-供应商-id=&lt;供应商-id&gt;The Hyper-V vendor ID. Some drivers or programs inside Windows guests need a specific ID. Hyper-V 供应商 ID。Windows 客户机中的某些驱动程序或程序需要特定的 ID。phys-bits=&lt;8-64|host&gt;The physical memory address bits that are reported to the guest OS. Should be smaller or equal to the host’s. Set to </span><em><span>host</span></em><span> to use value from host CPU, but note that doing so will break live migration to CPUs with other values. 报告给客户机操作系统的物理内存地址位。应小于或等于主机的地址。将设置为 </span><em><span>host</span></em><span> 以使用主机 CPU 中的值，但请注意，这样做会中断到具有其他值的 CPU 的实时迁移。reported-model=&lt;486 | Broadwell | Broadwell-IBRS | Broadwell-noTSX | Broadwell-noTSX-IBRS | Cascadelake-Server | Cascadelake-Server-noTSX | Cascadelake-Server-v2 | Cascadelake-Server-v4 | Cascadelake-Server-v5 | Conroe | Cooperlake | Cooperlake-v2 | EPYC | EPYC-Genoa | EPYC-IBPB | EPYC-Milan | EPYC-Milan-v2 | EPYC-Rome | EPYC-Rome-v2 | EPYC-Rome-v3 | EPYC-Rome-v4 | EPYC-v3 | EPYC-v4 | GraniteRapids | Haswell | Haswell-IBRS | Haswell-noTSX | Haswell-noTSX-IBRS | Icelake-Client | Icelake-Client-noTSX | Icelake-Server | Icelake-Server-noTSX | Icelake-Server-v3 | Icelake-Server-v4 | Icelake-Server-v5 | Icelake-Server-v6 | IvyBridge | IvyBridge-IBRS | KnightsMill | Nehalem | Nehalem-IBRS | Opteron_G1 | Opteron_G2 | Opteron_G3 | Opteron_G4 | Opteron_G5 | Penryn | SandyBridge | SandyBridge-IBRS | SapphireRapids | SapphireRapids-v2 | Skylake-Client | Skylake-Client-IBRS | Skylake-Client-noTSX-IBRS | Skylake-Client-v4 | Skylake-Server | Skylake-Server-IBRS | Skylake-Server-noTSX-IBRS | Skylake-Server-v4 | Skylake-Server-v5 | Westmere | Westmere-IBRS | athlon | core2duo | coreduo | host | kvm32 | kvm64 | max | pentium | pentium2 | pentium3 | phenom | qemu32 | qemu64&gt; (</span><em><span>default =</span></em><span> kvm64) reported-model=&lt;486 | Broadwell | Broadwell-IBRS | Broadwell-noTSX | Broadwell-noTSX-IBRS | Cascadelake-Server | Cascadelake-Server-noTSX | Cascadelake-Server-v2 | Cascadelake-Server-v4 | Cascadelake-Server-v5 | Conroe | Cooperlake | Cooperlake-v2 | EPYC | EPYC-Genoa | EPYC-IBPB | EPYC-Milan | EPYC-Milan-v2 | EPYC-Rome | EPYC-Rome-v2 | EPYC-Rome-v3 | EPYC-Rome-v4 | EPYC-v3 | EPYC-v4 | GraniteRapids | Haswell | Haswell-IBRS | Haswell-noTSX | Haswell-noTSX-IBRS | Icelake-Client | Icelake-Client-noTSX | Icelake-Server | Icelake-Server-noTSX | Icelake-Server-v3 | Icelake-Server-v4 | Icelake-Server-v5 | Icelake-Server-v6 | IvyBridge | IvyBridge-IBRS | KnightsMill | Nehalem | Nehalem-IBRS | Opteron_G1 | Opteron_G2 | Opteron_G3 | Opteron_G4 | Opteron_G5 | Penryn | SandyBridge | SandyBridge-IBRS | SapphireRapids | SapphireRapids-v2 | Skylake-Client | Skylake-Client-IBRS | Skylake-Client-noTSX-IBRS | Skylake-Client-v4 | Skylake-Server | Skylake-Server-IBRS | Skylake-Server-noTSX-IBRS | Skylake-Server-v4 | Skylake-Server-v5 | Westmere | Westmere-IBRS | athlon | core2duo | coreduo | host | kvm32 | kvm64 | max | pentium | pentium2 | pentium3 | phenom | qemu32 | qemu64&gt;（</span><em><span>默认值 =</span></em><span> kvm64）CPU model and vendor to report to the guest. Must be a QEMU/KVM supported model. Only valid for custom CPU model definitions, default models will always report themselves to the guest OS. 要向客户机报告的 CPU 型号和供应商。必须是 QEMU/KVM 支持的型号。默认模型仅对自定义 CPU 模型定义有效，将始终向客户机操作系统报告自身。</span></p></li><li><p><span>cpulimit: </span><number><span> (0 - 128) (</span><em><span>default =</span></em><span> 0) cpulimit： </span><number><span> （0 - 128） （</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Limit of CPU usage. CPU 使用率限制。</span><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9YHhAIJFCExAsKUkE8IAFFPIDUIqhBRSDRBUqC%0ACimFFBCBpCWx02IaZ3G2SdyxPZ7vHh6+mcnSZnFjKIge6Wj8zYzvPf9z/me5d8TM+F8WfbkNuFx5%0ABcDLLf/fAEZGRmx4eNh6enqsp6fHhoeHbWRk5D9aFeSlVqHNmzfb6H33sHnT7ZQmD5GfOMax6Sm+%0APl5h1Yc+xpYtW2SBbX1ReUkRGBkZsdH77mHLW95EOv4Ms3ueJh6YYPHUFF9aljJ63z3cf//9/5FI%0AvKQIDA8P293L2yhVjjH7t51ocDiviFecF46n7XzBreChhx4qNhH5t0XjJUVgx44ddGUZ9b/vIpQD%0AoRQIWSDJAiFL6B9axo4dO4gxAmANWVDLG+Ln82URMRGhVCqRHxonlAPqFXWKC4r6IhI6OMjMzBN4%0A/4LlTUQQEZxzZ32QJAlpmrb+p16vU6vVOHXq1AWjN18AnDj0F971vrs4OnmYJVkoDA4FCPUO172I%0ACgnt7SV++4vvsGhRJx3tJbIsRVVpsUnOBBABBVFEClKYwbKr7sTM7EIUnBcA7z21k7t49x1X8JXv%0AbOWra7rw5QRtcN8PLCfvvZJvb9vJycpJpg4/hp/N0I4SMQs4Jw0A5zBXHGiCaI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xk964xKpXKggAoTlWW8+OfPorlOQ//cjsDy1bS2dFO%0AW+diVly1iL6+Pqanpzl5qsL4pPHwN3/G1InDlMsZ7Z1tDA30cfWqIa5dexV9fb2YnT7UTxw4xsHJ%0Ao4yOjfOP8QOMjx/k4OQx7r777lY0zycXvJ02M4sxMjg4SL1eR0TYsGEDw8PD9PX10d7ejogUN3a1%0AGqpKCIE8z5mdnUVVqVarbN++nba2Nvbu3csDDzyAqrJ8+atb+zjn6e/vZ/Xq1axatYq1a9fS29tL%0AlmUMDQ1RKpXOm9EXvV6v1+tWr9eZnp5mZmaGWq1GjLHF62aiNZ+bnPfe45xrvTZzxMyYmZk56+LX%0AzKjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"><span>If the computer has 2 CPUs, it has total of </span><em><span>2</span></em><span> CPU time. Value </span><em><span>0</span></em><span> indicates no CPU limit. 如果计算机有 2 个 CPU，则总共有 </span><em><span>2</span></em><span> 个 CPU 时间。值 </span><em><span>0</span></em><span> 表示没有 CPU 限制。</span></p></li><li><p><span>cpuunits: </span><integer><span> (1 - 262144) (</span><em><span>default =</span></em><span> cgroup v1: 1024, cgroup v2: 100) cpuunits： </span><integer><span> （1 - 262144） （</span><em><span>默认 =</span></em><span> cgroup v1：1024， cgroup v2：100）</span></p><p><span>CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs. VM 的 CPU 权重。参数在内核公平调度器中使用。数字越大，此 VM 获得的 CPU 时间就越多。该数字与所有其他正在运行的 VM 的权重相关。</span></p></li><li><p><span>description: </span><string><span> 描述： </span><string></p><p><span>Description for the VM. Shown in the web-interface VM’s summary. This is saved as comment inside the configuration file. VM 的说明。显示在 Web 界面 VM 的摘要中。这将在配置文件中另存为注释。</span></p></li><li><p><span>efidisk0: [file=]</span><volume><span> [,efitype=&lt;2m|4m&gt;] [,format=</span><enum><span>] [,pre-enrolled-keys=&lt;1|0&gt;] [,size=</span><DiskSize><span>] efidisk0： [file=]</span><volume><span> [，efitype=&lt;2m|4m&gt;] [，format=</span><enum><span>] [，pre-enrolled-keys=&lt;1|0&gt;] [，size=</span><DiskSize><span>]</span></p><p><span>Configure a disk for storing EFI vars. 配置用于存储 EFI var 的磁盘。efitype=&lt;2m | 4m&gt; (</span><em><span>default =</span></em><span> 2m) efitype=&lt;2m | 4m&gt;（</span><em><span>默认值 =</span></em><span> 2m）Size and type of the OVMF EFI vars. </span><em><span>4m</span></em><span> is newer and recommended, and required for Secure Boot. For backwards compatibility, </span><em><span>2m</span></em><span> is used if not otherwise specified. Ignored for VMs with arch=aarch64 (ARM). OVMF EFI vars. 的大小和类型。 </span><em><span>4m</span></em><span> 是较新的，推荐使用，并且是安全启动所必需的。为了向后兼容，如果没有另行指定，则使用 </span><em><span>2m</span></em><span>。对于具有 arch=aarch64 （ARM） 的 VM，忽略此项。file=</span><volume><span> 文件=&lt;卷&gt;The drive’s backing volume. 驱动器的后备卷。format=&lt;cloop | cow | qcow | qcow2 | qed | raw | vmdk&gt;The drive’s backing file’s data format. 驱动器的备份文件的数据格式。pre-enrolled-keys=</span><boolean><span> (</span><em><span>default =</span></em><span> 0) pre-enrolled-keys=</span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）Use am EFI vars template with distribution-specific and Microsoft Standard keys enrolled, if used with </span><em><span>efitype=4m</span></em><span>. Note that this will enable Secure Boot by default, though it can still be turned off from within the VM. 如果与 </span><em><span>efitype=4m</span></em><span> 一起使用，请使用 am EFI vars 模板，并注册特定于分发的密钥和 Microsoft Standard 密钥。请注意，默认情况下，这将启用安全启动，但仍可以从 VM 内部关闭它。size=</span><DiskSize><span> 大小=</span><iskSize><span>Disk size. This is purely informational and has no effect. 磁盘大小。这纯粹是信息性的，没有任何效果。</span></p></li><li><p><span>freeze: </span><boolean><span> 冻结： </span><boolean></p><p><span>Freeze CPU at startup (use </span><em><span>c</span></em><span> monitor command to start execution). 启动时冻结 CPU（使用 </span><em><span>c</span></em><span> monitor 命令开始执行）。</span></p></li><li><p><span>hookscript: </span><string><span> hookscript： </span><string></p><p><span>Script that will be executed during various steps in the vms lifetime. 将在 vms 生命周期的各个步骤中执行的脚本。</span></p></li><li><p><span>hostpci[n]: [[host=]&lt;HOSTPCIID[;HOSTPCIID2...]&gt;] [,device-id=</span><hex id><span>] [,legacy-igd=&lt;1|0&gt;] [,mapping=</span><mapping-id><span>] [,mdev=</span><string><span>] [,pcie=&lt;1|0&gt;] [,rombar=&lt;1|0&gt;] [,romfile=</span><string><span>] [,sub-device-id=</span><hex id><span>] [,sub-vendor-id=</span><hex id><span>] [,vendor-id=</span><hex id><span>] [,x-vga=&lt;1|0&gt;] hostpci[n]： [[主机=]&lt;HOSTPCIID[;HOSTPCIID2...]&gt;] [，device-id=</span><hex id><span>] [，legacy-igd=&lt;1|0&gt;] [，mapping=</span><mapping-id><span>] [，mdev=</span><string><span>] [，pcie=&lt;1|0&gt;] [，rombar=&lt;1|0&gt;] [，romfile=</span><string><span>] [，sub-device-id=</span><hex id><span>] [，sub-vendor-id=</span><hex id><span>] [，vendor-id=</span><hex id><span>] [，x-vga=&lt;1|0&gt;]</span></p><p><span>Map host PCI devices into guest. 将主机 PCI 设备映射到客户机。</span><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9YHhAIJFCExAsKUkE8IAFFPIDUIqhBRSDRBUqC%0ACimFFBCBpCWx02IaZ3G2SdyxPZ7vHh6+mcnSZnFjKIge6Wj8zYzvPf9z/me5d8TM+F8WfbkNuFx5%0ABcDLLf/fAEZGRmx4eNh6enqsp6fHhoeHbWRk5D9aFeSlVq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vGCcEjaOEAwEQWdpgbGxujt7erOLO2mk3R8i0Wz9EiuUGz+qlKEQEUaJbI%0A4lTHmTVePKgWzpDGJGpc8CDTlEsuo88++wxXDA0UIUbAOP23KGZKjI48KnkuhcbiPbPCOBoeBikO%0ALk2VxjqNRilaAEqSZGEAbN261bZt+zW33XY7IAXXm6Ou0YhIMamaaUOl5WRrzg00viuKWWxpQUOH%0ANAZFQRpD48Xlkig0MTHBB95zG+VSylz1KCbWyDOh2XyK+56IqjWMKigkUnzWnPPFFFRRLZ29SQRU%0AELOGY4pZ6LKOlM07mZ07d/KOtw1TcB4sGkTDiDQ9K1IkrKeYmQC08d7pZLSiRBpE5s7aS0XAHFEK%0AAGY51Wr18g80Zmb33nsvX/z8XdSmj2AWOXhwkrxe46+79jB55Dh/3T2GxUhHextdXW2sXN7PNWtW%0AIQKDA71FFBoAjIgQkVg/a5+oHrU5zIznDhxk964xKpXKggAoTlWW8+OfPorlOQ//cjsDy1bS2dFO%0AW+diVly1iL6+Pqanpzl5qsL4pPHwN3/G1InDlMsZ7Z1tDA30cfWqIa5dexV9fb2YnT7UTxw4xsHJ%0Ao4yOjfOP8QOMjx/k4OQx7r777lY0zycXvJ02M4sxMjg4SL1eR0TYsGEDw8PD9PX10d7ejogUN3a1%0AGqpKCIE8z5mdnUVVqVarbN++nba2Nvbu3csDDzyAqrJ8+atb+zjn6e/vZ/Xq1axatYq1a9fS29tL%0AlmUMDQ1RKpXOm9EXvV6v1+tWr9eZnp5mZmaGWq1GjLHF62aiNZ+bnPfe45xrvTZzxMyYmZk56+LX%0AzKjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"><span>This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care. 此选项允许直接访问主机硬件。因此，无法再迁移此类机器 - 请特别小心使用。</span><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAKdUlEQVRoge1Ze1AV1x3+zt279wEi%0ADWCYGzRVktqa1MEmmtbWR22ncXxUrTDWV/5IqG2wUAUfmUwSkk6V+EAJCEQC6figwZBqZtRxqukf%0AtebRZBpFG1S0hiRErwiaKK977+6eX//YPXt37+UiIJlMZnpmdnb33PP4vt97z2VEhG9yc3zdAO60%0A/Z/A192+8QScX8Wifr+fWltbzffU1FT4fD72Vew15ASampqovr4eBw8eNPvGjRuHzMxMmj9//tCT%0AIKIhu958801yuVwEoNdr48aNNJT7EdHQEdi/fz/JshwTvLiKioqGlMSQLFJfX0+MMRvQsWNSqXLz%0AH2jez78fRWLTpk1DRuKOF6irqyOn02kDOP8XGdTz+VFSP91Hatu79NRvZ0SR2LJly5CQuKPJtbW1%0AJEmSDdivHp1AwctHSblYSsqFElLOF5PavIvWZU+LIrF169Y7JjHoibt3744CnzXrIQpeOUbKhVJS%0AmkpIPV9MyrnNpJwtIuVSNa15/MdRJLZt23ZHJBjRwIu5N954gxYvXgzOudm3aO5E1L5SBNZ1Hoxr%0AINLAyH6HJxVP/WkXtu9+37ZeSUkJVq9ePagQO+BMXFNTEwV+ybxHsPeVIjg6zwOkgSWNhuOuUUBC%0AKhxJY0AggDSgpwWbn1mO1csftq1ZUFCA0tLSQZXFA0pkVVVVlJOTA6vWsmY9hF07N0AS4OU48LgR%0AWLO+FPFxboxMS8G5hlPYmPMI4jwM1P0Jtj67DJyrKHvtNADdjPPz8+FwOCgvL29gmuivrVVUVESF%0AyqxZD1PoyjFSL+7QHbapmJTml+n9EzVRtl676ZekNKwl5VQ+KSfzKHR2E+UutodYxhiVl5cPyCf6%0AZUJlZWWUm5trk/wTi6bgtVdf1M2Gq2DEwUgDNBWhUDBqjfSRwwGoIOEP3c3Y/uxirFw0zibMvLw8%0AVFZW9tucbkugoqKCVq1aZQO/YslUVJU+D9bVBIDroLgK4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AiTNWJrZGI+HEwi6FisUVCAQQCASwZ88eVFZW9lk9JicnY/369fD5fPB4PCbo+Ph4k4TH44HL5YLX%0A64XX6zXH9EKE9aUBRkTEGLNJP1Kd4nI4HMjOzkZ8fDyKi4ttJ3eiJSYmYu3atRg1apQJzuv1wuPx%0AwOPxwOFwmEBFHnA6nXC5XGYSiywlbns2SnoDANN0hMNZnS0UCpkaOnPmDN566y20tLSY2ktLS8OM%0AGTOQkpICt9uNuLg4M2EJ8CJZSZJkZmFBwkrAWpH2+3BXEBEkRIhTVdVMOCL5qKqKy5cvQ1EUaJoG%0AVVWRnKx/Jlpt3eVy2QCKu9C68AFr9o0spwd0Oh1ZYggCIlNaiQktiXdhZgKQABcp3ci7LMtM7B0J%0AfsAErJoAYItG1mdr+hfvVlACtHDIXkploYXbHvQOikDEe6/ZmjFmAhf9ZvJxOk2Qol88W4kYz32S%0AGNQfHLG+TyMTkAVEr88xQfVnkBg7GAKixSIykDYQsL21/wFkW/B5QqT9lwAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Caution"><span>Experimental! User reported problems with this option. 实验的！用户报告了使用此选项的问题。device-id=</span><hex id><span> 设备 id=</span><hex id><span>Override PCI device ID visible to guest 覆盖客户机可见的 PCI 设备 IDhost=&lt;HOSTPCIID[;HOSTPCIID2...]&gt; 主机=&lt;HOSTPCIID[;HOSTPCIID2...]&gt;Host PCI device pass through. The PCI ID of a host’s PCI device or a list of PCI virtual functions of the host. HOSTPCIID syntax is: 主机 PCI 设备直通。主机的 PCI 设备的 PCI ID 或主机的 PCI 虚拟功能列表。HOSTPCIID 语法为：</span><em><span>bus:dev.func</span></em><span> (hexadecimal numbers) </span><em><span>bus：dev.func</span></em><span> （十六进制数）You can us the </span><em><span>lspci</span></em><span> command to list existing PCI devices. 您可以使用 </span><em><span>lspci</span></em><span> 命令来列出现有的 PCI 设备。Either this or the </span><em><span>mapping</span></em><span> key must be set. 必须设置此键或</span><em><span>映射</span></em><span>键。legacy-igd=</span><boolean><span> (</span><em><span>default =</span></em><span> 0) legacy-igd=</span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）Pass this device in legacy IGD mode, making it the primary and exclusive graphics device in the VM. Requires </span><em><span>pc-i440fx</span></em><span> machine type and VGA set to </span><em><span>none</span></em><span>. 在传统 IGD 模式下传递此设备，使其成为 VM 中的主要和独占图形设备。需要 </span><em><span>pc-i440fx</span></em><span> 机器类型且 VGA 设置为</span><em><span>无</span></em><span>。mapping=</span><mapping-id><span> 映射=&lt;映射-id&gt;The ID of a cluster wide mapping. Either this or the default-key </span><em><span>host</span></em><span> must be set. 集群范围映射的 ID。必须设置此主机或默认键</span><em><span>主机</span></em><span>。mdev=</span><string><span>The type of mediated device to use. An instance of this type will be created on startup of the VM and will be cleaned up when the VM stops. 要使用的中介设备的类型。此类型的实例将在 VM 启动时创建，并在 VM 停止时进行清理。pcie=</span><boolean><span> (</span><em><span>default =</span></em><span> 0) pcie=</span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）Choose the PCI-express bus (needs the </span><em><span>q35</span></em><span> machine model). 选择 PCI-express 总线（需要 </span><em><span>q35</span></em><span> 机器型号）。rombar=</span><boolean><span> (</span><em><span>default =</span></em><span> 1) rombar=</span><boolean><span>（</span><em><span>默认值 =</span></em><span> 1）Specify whether or not the device’s ROM will be visible in the guest’s memory map. 指定设备的 ROM 是否在客户机的内存映射中可见。romfile=</span><string><span>Custom pci device rom filename (must be located in /usr/share/kvm/). 自定义 pci 设备 rom 文件名（必须位于 /usr/share/kvm/ 中）。sub-device-id=</span><hex id><span> 子设备 id=</span><hex id><span>Override PCI subsystem device ID visible to guest 覆盖客户机可见的 PCI 子系统设备 IDsub-vendor-id=</span><hex id><span> 子供应商 id=</span><hex id><span>Override PCI subsystem vendor ID visible to guest 覆盖客户机可见的 PCI 子系统供应商 IDvendor-id=</span><hex id><span>Override PCI vendor ID visible to guest 覆盖对客户机可见的 PCI 供应商 IDx-vga=</span><boolean><span> (</span><em><span>default =</span></em><span> 0) x-vga=</span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）Enable vfio-vga device support. 启用 vfio-vga 设备支持。</span></p></li><li><p><span>hotplug: </span><string><span> (</span><em><span>default =</span></em><span> network,disk,usb) 热插拔： </span><string><span> （</span><em><span>默认 =</span></em><span> 网络，磁盘，USB）</span></p><p><span>Selectively enable hotplug features. This is a comma separated list of hotplug features: </span><em><span>network</span></em><span>, </span><em><span>disk</span></em><span>, </span><em><span>cpu</span></em><span>, </span><em><span>memory</span></em><span>, </span><em><span>usb</span></em><span> and </span><em><span>cloudinit</span></em><span>. Use </span><em><span>0</span></em><span> to disable hotplug completely. Using </span><em><span>1</span></em><span> as value is an alias for the default network,disk,usb. USB hotplugging is possible for guests with machine version &gt;= 7.1 and ostype l26 or windows &gt; 7. 有选择地启用热插拔功能。这是一个以逗号分隔的热插拔功能列表：</span><em><span>网络</span></em><span>、</span><em><span>磁盘</span></em><span>、</span><em><span>CPU</span></em><span>、</span><em><span>内存</span></em><span>、</span><em><span>USB</span></em><span> 和 </span><em><span>cloudinit</span></em><span>。使用 </span><em><span>0</span></em><span> 完全禁用热插拔。使用 </span><em><span>1</span></em><span> 作为值是默认网络、磁盘、USB 的别名。对于计算机版本 &gt;= 7.1 和 ostype l26 或 Windows &gt; 7 的乘客，可以使用 USB 热插拔。</span></p></li><li><p><span>hugepages: &lt;1024 | 2 | any&gt; hugepages： &lt;1024 | 2 | any&gt;</span></p><p><span>Enable/disable hugepages memory. 启用/禁用 hugepages 内存。</span></p></li><li><p><span>ide[n]: [file=]</span><volume><span> [,aio=&lt;native|threads|io_uring&gt;] [,backup=&lt;1|0&gt;] [,bps=</span><bps><span>] [,bps_max_length=</span><seconds><span>] [,bps_rd=</span><bps><span>] [,bps_rd_max_length=</span><seconds><span>] [,bps_wr=</span><bps><span>] [,bps_wr_max_length=</span><seconds><span>] [,cache=</span><enum><span>] [,cyls=</span><integer><span>] [,detect_zeroes=&lt;1|0&gt;] [,discard=&lt;ignore|on&gt;] [,format=</span><enum><span>] [,heads=</span><integer><span>] [,iops=</span><iops><span>] [,iops_max=</span><iops><span>] [,iops_max_length=</span><seconds><span>] [,iops_rd=</span><iops><span>] [,iops_rd_max=</span><iops><span>] [,iops_rd_max_length=</span><seconds><span>] [,iops_wr=</span><iops><span>] [,iops_wr_max=</span><iops><span>] [,iops_wr_max_length=</span><seconds><span>] [,mbps=</span><mbps><span>] [,mbps_max=</span><mbps><span>] [,mbps_rd=</span><mbps><span>] [,mbps_rd_max=</span><mbps><span>] [,mbps_wr=</span><mbps><span>] [,mbps_wr_max=</span><mbps><span>] [,media=&lt;cdrom|disk&gt;] [,model=</span><model><span>] [,replicate=&lt;1|0&gt;] [,rerror=&lt;ignore|report|stop&gt;] [,secs=</span><integer><span>] [,serial=</span><serial><span>] [,shared=&lt;1|0&gt;] [,size=</span><DiskSize><span>] [,snapshot=&lt;1|0&gt;] [,ssd=&lt;1|0&gt;] [,trans=&lt;none|lba|auto&gt;] [,werror=</span><enum><span>] [,wwn=</span><wwn><span>] IDE[n]： [文件=] [，aio=] [，备份&lt;1 |0&gt;=] [，bps=] [，bps_max_length=] [，bps_rd=] [，bps_rd_max_length=] [，bps_wr=] [，bps_wr_max_length=] [，cache=] [，cyls=] [，detect_zeroes=&lt;1 |0&gt;] [，discard=] [，format=] [，heads=] [，iops=] [，iops_max=] [，iops_max_length=] [，iops_rd=] [，iops_rd_max=] [，iops_rd_max_length=] [，iops_wr=] [，iops_wr_max=] [，iops_wr_max_length=] [，mbps=] [，mbps_max=] [，mbps_rd=] [，mbps_rd_max=] [，mbps_wr=] [，mbps_wr_max=] [，media=] [，model=] [，replicate&lt;1 |0&gt;=] [，rerror=] [，secs=] [，serial=] [，shared=&lt;1 |0&gt;] [，size=] [，snapshot=&lt;1 |0&gt;] [，ssd&lt;1 |0&gt;=] [，trans=] [，werror=] [，wwn=]</span></p><p><span>Use volume as IDE hard disk or CD-ROM (n is 0 to 3). 使用卷作为 IDE 硬盘或 CD-ROM（n 为 0 到 3）。aio=&lt;io_uring | native | threads&gt; aio=&lt;io_uring | 本机 | 线程&gt;AIO type to use. 要使用的 AIO 类型。backup=</span><boolean><span> 备份=</span><boolean><span>Whether the drive should be included when making backups. 进行备份时是否应包含驱动器。bps=</span><bps><span>Maximum r/w speed in bytes per second. 最大 r/w 速度（以字节/秒为单位）。bps_max_length=</span><seconds><span> bps_max_length=&lt;秒&gt;Maximum length of I/O bursts in seconds. I/O 突发的最大长度（以秒为单位）。bps_rd=</span><bps><span>Maximum read speed in bytes per second. 最大读取速度（以字节/秒为单位）。bps_rd_max_length=</span><seconds><span> bps_rd_max_length=&lt;秒&gt;Maximum length of read I/O bursts in seconds. 读取 I/O 突发的最大长度（以秒为单位）。bps_wr=</span><bps><span>Maximum write speed in bytes per second. 最大写入速度（以字节/秒为单位）。bps_wr_max_length=</span><seconds><span> bps_wr_max_length=&lt;秒&gt;Maximum length of write I/O bursts in seconds. 写入 I/O 突发的最大长度（以秒为单位）。cache=&lt;directsync | none | unsafe | writeback | writethrough&gt; cache=&lt;directsync | none | 不安全 | writeback | writethrough&gt;The drive’s cache mode 驱动器的缓存模式cyls=</span><integer><span>Force the drive’s physical geometry to have a specific cylinder count. 强制驱动器的物理几何形状具有特定的柱面计数。detect_zeroes=</span><boolean><span>Controls whether to detect and try to optimize writes of zeroes. 控制是否检测和尝试优化零的写入。discard=&lt;ignore | on&gt;Controls whether to pass discard/trim requests to the underlying storage. 控制是否将丢弃/修剪请求传递到底层存储。file=</span><volume><span> 文件=&lt;卷&gt;The drive’s backing volume. 驱动器的后备卷。format=&lt;cloop | cow | qcow | qcow2 | qed | raw | vmdk&gt;The drive’s backing file’s data format. 驱动器的备份文件的数据格式。heads=</span><integer><span>Force the drive’s physical geometry to have a specific head count. 强制驱动器的物理几何形状具有特定的磁头数。iops=</span><iops><span>Maximum r/w I/O in operations per second. 每秒操作中的最大 r/w I/O。iops_max=</span><iops><span>Maximum unthrottled r/w I/O pool in operations per second. 每秒操作中最大未受限制的 r/w I/O 池。iops_max_length=</span><seconds><span> iops_max_length=&lt;秒&gt;Maximum length of I/O bursts in seconds. I/O 突发的最大长度（以秒为单位）。iops_rd=</span><iops><span>Maximum read I/O in operations per second. 每秒操作中的最大读取 I/O。iops_rd_max=</span><iops><span>Maximum unthrottled read I/O pool in operations per second. 每秒操作中的最大不受限制的读取 I/O 池。iops_rd_max_length=</span><seconds><span> iops_rd_max_length=&lt;秒&gt;Maximum length of read I/O bursts in seconds. 读取 I/O 突发的最大长度（以秒为单位）。iops_wr=</span><iops><span>Maximum write I/O in operations per second. 每秒操作中的最大写入 I/O。iops_wr_max=</span><iops><span>Maximum unthrottled write I/O pool in operations per second. 每秒操作中的最大未限制写入 I/O 池。iops_wr_max_length=</span><seconds><span> iops_wr_max_length=&lt;秒&gt;Maximum length of write I/O bursts in seconds. 写入 I/O 突发的最大长度（以秒为单位）。mbps=</span><mbps><span>Maximum r/w speed in megabytes per second. 最大 r/w 速度（以兆字节/秒为单位）。mbps_max=</span><mbps><span>Maximum unthrottled r/w pool in megabytes per second. 最大未限制的 r/w 池（以兆字节/秒为单位）。mbps_rd=</span><mbps><span>Maximum read speed in megabytes per second. 最大读取速度（以兆字节/秒为单位）。mbps_rd_max=</span><mbps><span>Maximum unthrottled read pool in megabytes per second. 最大未限制读取池（以兆字节/秒为单位）。mbps_wr=</span><mbps><span>Maximum write speed in megabytes per second. 最大写入速度（以兆字节/秒为单位）。mbps_wr_max=</span><mbps><span>Maximum unthrottled write pool in megabytes per second. 最大未限制写入池（以兆字节/秒为单位）。media=&lt;cdrom | disk&gt; (</span><em><span>default =</span></em><span> disk) media=&lt;cdrom | disk&gt;（</span><em><span>默认值 =</span></em><span> 磁盘）The drive’s media type. 驱动器的介质类型。model=</span><model><span> 模型=&lt;模型&gt;The drive’s reported model name, url-encoded, up to 40 bytes long. 驱动器报告的型号名称，URL 编码，最长 40 个字节。replicate=</span><boolean><span> (</span><em><span>default =</span></em><span> 1) replicate=</span><boolean><span>（</span><em><span>默认值 =</span></em><span> 1）Whether the drive should considered for replication jobs. 是否应考虑将驱动器用于复制作业。rerror=&lt;ignore | report | stop&gt; rerror=&lt;ignore | 报告 | stop&gt;Read error action. 读取错误操作。secs=</span><integer><span> 秒=</span><integer><span>Force the drive’s physical geometry to have a specific sector count. 强制驱动器的物理几何图形具有特定的扇区计数。serial=</span><serial><span> 序列号=&lt;序列号&gt;The drive’s reported serial number, url-encoded, up to 20 bytes long. 驱动器报告的序列号，URL 编码，最长 20 个字节。shared=</span><boolean><span> (</span><em><span>default =</span></em><span> 0) shared=</span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）Mark this locally-managed volume as available on all nodes. 将此本地管理的卷标记为在所有节点上都可用。</span><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAMVUlEQVRogdWZeXDVVZbHP7/f27JB%0AwtJIiCERRFlbx5FuHRrRBgtBsRIwCCOrFmGmiDBjYVNlQlgiQjU6IjI4xLJxGf5QGp0Cbaftsu3R%0Ahu6aYXqgLZoWEsjyyDP7S972e7/l3vnj5cW3Ji9M/zOn6lRS997fvd/vueece+59ipSS/89iv5mP%0AZEQQQsS23RQARVEAUFUVRVFQog0ZyogJSClld3c327Ztw7IsLMuKto90KgBsNhtVVVXMnj2bvLw8%0A7Ha7HBEJKWXGKoSQXV1dcsuWLfLSpUsyKkKIIdWyrLTqdrvlU089Jc+cOSM9Ho8Mh8NSCCEzxTRi%0A8JWVlbKtre0vAt6yLGmapmxtbZXr1q2TZ86ckW1tbSMikTH4GzduyKqqqkHwsSA1TZOhUChOg8Hg%0AoBqGIQ3DSAk+VleuXDliEspwviullD09PbzwwgscO3Yszt91XScQCNDZ2YlhGIPfuFwu7Pb48FJV%0AlZycnEG/z8/PRwiBqqqDYzweD88//zyrV69m7ty5jBs3DofDMWRgD0lASik9Hg979uzh2LFjcYEa%0ACoVob2/n2q9+hbZ585BGSCWltbVMr61NtSYbN25k7dq1zJkzZ1gS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VmZFjwk%0AnAOxJF566SW2bNnChQsXkmKipKSEB959l9vmzcvo1pZOpz/8ME98+mla8Bs2bGDZsmVpwUOa5/VE%0Ad0oXE319fXxWXs43Z88m9Q0n03/0I1YPJIRE8OfOnWPHjh2UlZUNCT4tgUQSO3fupKqqigceeGCw%0AP/a7VM8emUg0VcbK+fPn2bp1KytWrBgW/JAEEknU1NTw7LPPMn/+/GFBZQI8lZw/f57nnnuO5cuX%0AM2XKlGHBD0sgkURdXR2PP/44FRUVNwV+qP7Tp09z8ODBjNxmRAQSSRw4cIBly5axdOnSvwh4RVH4%0A4osv2L9/P2VlZRlbfkQEEkls376djo4OQqHE83bk4nK5EEKwZs0aSktLRwR+RATgOxItLS1cu3aN%0Avr6+wTfK/4tEfzeeMmUKkydPzhg8jJAAREgEg0H6+vrQNC2pFL8ZUVWVrKws8vPzycnJQVXVjH/s%0A/F/lgJiyQFHragAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Warning"><span>This option does not share the volume automatically, it assumes it is shared already! 此选项不会自动共享卷，而是假定它已经共享！size=</span><DiskSize><span> 大小=</span><iskSize><span>Disk size. This is purely informational and has no effect. 磁盘大小。这纯粹是信息性的，没有任何效果。snapshot=</span><boolean><span> 快照=</span><boolean><span>Controls qemu’s snapshot mode feature. If activated, changes made to the disk are temporary and will be discarded when the VM is shutdown. 控制 qemu 的快照模式功能。如果激活，对磁盘所做的更改是临时的，并且在 VM 关闭时将被丢弃。ssd=</span><boolean><span>Whether to expose this drive as an SSD, rather than a rotational hard disk. 是否将此驱动器公开为 SSD，而不是旋转硬盘。trans=&lt;auto | lba | none&gt;Force disk geometry bios translation mode. 强制磁盘几何 bios 转换模式。werror=&lt;enospc | ignore | report | stop&gt; werror=&lt;enospc | 忽略 | 报告 | stop&gt;Write error action. 写入错误操作。wwn=</span><wwn><span>The drive’s worldwide name, encoded as 16 bytes hex string, prefixed by </span><em><span>0x</span></em><span>. 驱动器的全球名称，编码为 16 字节十六进制字符串，以 </span><em><span>0x</span></em><span> 为前缀。</span></p></li><li><p><span>ipconfig[n]: [gw=</span><GatewayIPv4><span>] [,gw6=</span><GatewayIPv6><span>] [,ip=&lt;IPv4Format/CIDR&gt;] [,ip6=&lt;IPv6Format/CIDR&gt;] ipconfig[n]： [gw=</span><GatewayIPv4><span>] [，gw6=</span><GatewayIPv6><span>] [，ip=&lt;IPv4Format/CIDR&gt;] [，ip6=&lt;IPv6Format/CIDR&gt;]</span></p><p><span>cloud-init: Specify IP addresses and gateways for the corresponding interface. cloud-init：指定对应接口的IP地址和网关。IP addresses use CIDR notation, gateways are optional but need an IP of the same type specified. IP 地址使用 CIDR 表示法，网关是可选的，但需要指定的相同类型的 IP。The special string </span><em><span>dhcp</span></em><span> can be used for IP addresses to use DHCP, in which case no explicit gateway should be provided. For IPv6 the special string </span><em><span>auto</span></em><span> can be used to use stateless autoconfiguration. This requires cloud-init 19.4 or newer. 特殊字符串 </span><em><span>dhcp</span></em><span> 可用于 IP 地址以使用 DHCP，在这种情况下，不应提供显式网关。对于 IPv6，可以使用特殊字符串 </span><em><span>auto</span></em><span> 来使用无状态自动配置。这需要 cloud-init 19.4 或更高版本。If cloud-init is enabled and neither an IPv4 nor an IPv6 address is specified, it defaults to using dhcp on IPv4. 如果启用了 cloud-init，且未指定 IPv4 和 IPv6 地址，则默认在 IPv4 上使用 dhcp。gw=</span><GatewayIPv4><span>Default gateway for IPv4 traffic. IPv4 流量的默认网关。</span><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9YHhAIJFCExAsKUkE8IAFFPIDUIqhBRSDRBUqC%0ACimFFBCBpCWx02IaZ3G2SdyxPZ7vHh6+mcnSZnFjKIge6Wj8zYzvPf9z/me5d8TM+F8WfbkNuFx5%0ABcDLLf/fAEZGRmx4eNh6enqsp6fHhoeHbWRk5D9a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oE0W6gvGCcEjaOEAwEQWdpgbGxujt7erOLO2mk3R8i0Wz9EiuUGz+qlKEQEUaJbI%0A4lTHmTVePKgWzpDGJGpc8CDTlEsuo88++wxXDA0UIUbAOP23KGZKjI48KnkuhcbiPbPCOBoeBikO%0ALk2VxjqNRilaAEqSZGEAbN261bZt+zW33XY7IAXXm6Ou0YhIMamaaUOl5WRrzg00viuKWWxpQUOH%0ANAZFQRpD48Xlkig0MTHBB95zG+VSylz1KCbWyDOh2XyK+56IqjWMKigkUnzWnPPFFFRRLZ29SQRU%0AELOGY4pZ6LKOlM07mZ07d/KOtw1TcB4sGkTDiDQ9K1IkrKeYmQC08d7pZLSiRBpE5s7aS0XAHFEK%0AAGY51Wr18g80Zmb33nsvX/z8XdSmj2AWOXhwkrxe46+79jB55Dh/3T2GxUhHextdXW2sXN7PNWtW%0AIQKDA71FFBoAjIgQkVg/a5+oHrU5zIznDhxk964xKpXKggAoTlWW8+OfPorlOQ//cjsDy1bS2dFO%0AW+diVly1iL6+Pqanpzl5qsL4pPHwN3/G1InDlMsZ7Z1tDA30cfWqIa5dexV9fb2YnT7UTxw4xsHJ%0Ao4yOjfOP8QOMjx/k4OQx7r777lY0zycXvJ02M4sxMjg4SL1eR0TYsGEDw8PD9PX10d7ejogUN3a1%0AGqpKCIE8z5mdnUVVqVarbN++nba2Nvbu3csDDzyAqrJ8+atb+zjn6e/vZ/Xq1axatYq1a9fS29tL%0AlmUMDQ1RKpXOm9EXvV6v1+tWr9eZnp5mZmaGWq1GjLHF62aiNZ+bnPfe45xrvTZzxMyYmZk56+LX%0AzKjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"><span>Requires option(s): ip 需要选项： ipgw6=</span><GatewayIPv6><span>Default gateway for IPv6 traffic. IPv6 流量的默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AlmUMDQ1RKpXOm9EXvV6v1+tWr9eZnp5mZmaGWq1GjLHF62aiNZ+bnPfe45xrvTZzxMyYmZk56+LX%0AzKjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"><span>Requires option(s): ip6 需要选项： ip6ip=&lt;IPv4Format/CIDR&gt; (</span><em><span>default =</span></em><span> dhcp) ip=&lt;IPv4Format/CIDR&gt;（</span><em><span>默认值 =</span></em><span> dhcp）IPv4 address in CIDR format. CIDR 格式的 IPv4 地址。ip6=&lt;IPv6Format/CIDR&gt; (</span><em><span>default =</span></em><span> dhcp) ip6=&lt;IPv6Format/CIDR&gt;（</span><em><span>默认 =</span></em><span> dhcp）IPv6 address in CIDR format. CIDR 格式的 IPv6 地址。</span></p></li><li><p><span>ivshmem: size=</span><integer><span> [,name=</span><string><span>] ivshmem： 大小=</span><integer><span> [，名称=</span><string><span>]</span></p><p><span>Inter-VM shared memory. Useful for direct communication between VMs, or to the host. 虚拟机间共享内存。对于虚拟机之间的直接通信或与主机的直接通信非常有用。name=</span><string><span> 名称=</span><string><span>The name of the file. Will be prefixed with </span><em><span>pve-shm-</span></em><span>. Default is the VMID. Will be deleted when the VM is stopped. 文件的名称。将以 </span><em><span>pve-shm-</span></em><span> 为前缀。默认值为 VMID。当 VM 停止时，将删除该 VM。size=</span><integer><span> (1 - N) 大小=</span><integer><span> （1 - N）The size of the file in MB. 文件大小（以 MB 为单位）。</span></p></li><li><p><span>keephugepages: </span><boolean><span> (</span><em><span>default =</span></em><span> 0) keephugepages： </span><boolean><span> （</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Use together with hugepages. If enabled, hugepages will not not be deleted after VM shutdown and can be used for subsequent starts. 与 hugepages 一起使用。如果启用，则 Hugepages 在 VM 关闭后不会被删除，并且可用于后续启动。</span></p></li><li><p><span>keyboard: &lt;da | de | de-ch | en-gb | en-us | es | fi | fr | fr-be | fr-ca | fr-ch | hu | is | it | ja | lt | mk | nl | no | pl | pt | pt-br | sl | sv | tr&gt; 键盘： &lt;da | de | de-ch | en-gb | en-us | es | fi | fr | fr-be | fr-ca | fr-ch | 胡 | 是 | it | ja | lt | mk | nl | no | pl | pt | pt-br | sl | sv | tr&gt;</span></p><p><span>Keyboard layout for VNC server. This option is generally not required and is often better handled from within the guest OS. VNC 服务器的键盘布局。此选项通常不是必需的，通常最好在客户机操作系统中处理。</span></p></li><li><p><span>kvm: </span><boolean><span> (</span><em><span>default =</span></em><span> 1) kvm： </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>Enable/disable KVM hardware virtualization. 启用/禁用 KVM 硬件虚拟化。</span></p></li><li><p><span>localtime: </span><boolean><span> 本地时间： </span><boolean></p><p><span>Set the real time clock (RTC) to local time. This is enabled by default if the ostype indicates a Microsoft Windows OS. 将实时时钟 （RTC） 设置为本地时间。如果 ostype 指示 Microsoft Windows 操作系统，则默认情况下启用此功能。</span></p></li><li><p><span>lock: &lt;backup | clone | create | migrate | rollback | snapshot | snapshot-delete | suspended | suspending&gt; 锁定： &lt;备份 | 克隆 | 创建 | 迁移 | 回滚 | 快照 | 快照删除 | 已挂起 | 挂起&gt;</span></p><p><span>Lock/unlock the VM. 锁定/解锁 VM。</span></p></li><li><p><span>machine: [[type=]</span><machine type><span>] [,viommu=&lt;intel|virtio&gt;] 机器：[[type=]</span><machine type><span>] [，viommu=&lt;intel|virtio&gt;]</span></p><p><span>Specify the QEMU machine. 指定 QEMU 机器。type=</span><machine type><span> 类型=&lt;机器类型&gt;Specifies the QEMU machine type. 指定 QEMU 机器类型。viommu=&lt;intel | virtio&gt;Enable and set guest vIOMMU variant (Intel vIOMMU needs q35 to be set as machine type). 启用并设置客户机 vIOMMU 变体（Intel vIOMMU 需要将 q35 设置为机器类型）。</span></p></li><li><p><span>memory: [current=]</span><integer><span> 内存：[current=]</span><integer></p><p><span>Memory properties. 内存属性。current=</span><integer><span> (16 - N) (</span><em><span>default =</span></em><span> 512) current=</span><integer><span> （16 - N） （</span><em><span>默认值 =</span></em><span> 512）Current amount of online RAM for the VM in MiB. This is the maximum available memory when you use the balloon device. VM 的当前联机 RAM 量（以 MiB 为单位）。这是使用气球设备时的最大可用内存。</span></p></li><li><p><span>migrate_downtime: </span><number><span> (0 - N) (</span><em><span>default =</span></em><span> 0.1) migrate_downtime： </span><number><span> （0 - N） （</span><em><span>默认值 =</span></em><span> 0.1）</span></p><p><span>Set maximum tolerated downtime (in seconds) for migrations. Should the migration not be able to converge in the very end, because too much newly dirtied RAM needs to be transferred, the limit will be increased automatically step-by-step until migration can converge. 为迁移设置允许的最大停机时间（以秒为单位）。如果迁移最终无法收敛，因为需要传输太多新污染的 RAM，则限制将自动逐步增加，直到迁移可以收敛。</span></p></li><li><p><span>migrate_speed: </span><integer><span> (0 - N) (</span><em><span>default =</span></em><span> 0) migrate_speed： </span><integer><span> （0 - N） （</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Set maximum speed (in MB/s) for migrations. Value 0 is no limit. 设置迁移的最大速度（以 MB/s 为单位）。值 0 没有限制。</span></p></li><li><p><span>name: </span><string><span> 名称： </span><string></p><p><span>Set a name for the VM. Only used on the configuration web interface. 为 VM 设置名称。仅在配置 Web 界面上使用。</span></p></li><li><p><span>nameserver: </span><string><span> 名称服务器： </span><string></p><p><span>cloud-init: Sets DNS server IP address for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set. cloud-init：设置容器的DNS服务器IP地址。如果 searchdomain 和 nameserver 均未设置，Create 将自动使用主机的设置。</span></p></li><li><p><span>net[n]: [model=]</span><enum><span> [,bridge=</span><bridge><span>] [,firewall=&lt;1|0&gt;] [,link_down=&lt;1|0&gt;] [,macaddr=</span><a href='XX:XX:XX:XX:XX:XX' target='_blank' class='url'>XX:XX:XX:XX:XX:XX</a><span>] [,mtu=</span><integer><span>] [,queues=</span><integer><span>] [,rate=</span><number><span>] [,tag=</span><integer><span>] [,trunks=&lt;vlanid[;vlanid...]&gt;] [,</span><model><span>=</span><macaddr><span>] net[n]： [model=]</span><enum><span> [，bridge=</span><bridge><span>] [，firewall=&lt;1|0&gt;] [，link_down=&lt;1|0&gt;] [，macaddr=&lt;XX：XX：XX：XX：XX：XX&gt;] [，mtu=</span><integer><span>] [，queues=</span><integer><span>] [，rate=</span><number><span>] [，tag=</span><integer><span>] [，trunks=&lt;vlanid[;弗拉尼德...]&gt;] [，</span><model><span>=</span><macaddr><span>]</span></p><p><span>Specify network devices. 指定网络设备。bridge=</span><bridge><span> 桥=&lt;桥&gt;Bridge to attach the network device to. The Proxmox VE standard bridge is called </span><em><span>vmbr0</span></em><span>. 用于连接网络设备的桥接器。Proxmox VE 标准网桥称为 </span><em><span>vmbr0</span></em><span>。If you do not specify a bridge, we create a kvm user (NATed) network device, which provides DHCP and DNS services. The following addresses are used: 如果您不指定网桥，我们将创建一个 kvm 用户 （NATed） 网络设备，该设备提供 DHCP 和 DNS 服务。使用以下地址：</span><code>10.0.2.2   Gateway 10.0.2.3   DNS Server 10.0.2.4   SMB Server</code><span>The DHCP server assign addresses to the guest starting from 10.0.2.15. DHCP 服务器从 10.0.2.15 开始为客户机分配地址。firewall=</span><boolean><span> 防火墙=</span><boolean><span>Whether this interface should be protected by the firewall. 此接口是否应受防火墙保护。link_down=</span><boolean><span>Whether this interface should be disconnected (like pulling the plug). 是否应断开此接口（如拔插头）。macaddr=</span><a href='XX:XX:XX:XX:XX:XX' target='_blank' class='url'>XX:XX:XX:XX:XX:XX</a><span> macaddr=&lt;XX：XX：XX：XX：XX：XX&gt;A common MAC address with the I/G (Individual/Group) bit not set. 未设置 I/G（个人/组）位的公共 MAC 地址。model=&lt;e1000 | e1000-82540em | e1000-82544gc | e1000-82545em | e1000e | i82551 | i82557b | i82559er | ne2k_isa | ne2k_pci | pcnet | rtl8139 | virtio | vmxnet3&gt;Network Card Model. The </span><em><span>virtio</span></em><span> model provides the best performance with very low CPU overhead. If your guest does not support this driver, it is usually best to use </span><em><span>e1000</span></em><span>. 网卡型号。</span><em><span>virtio</span></em><span> 模型以非常低的 CPU 开销提供最佳性能。如果您的客人不支持此驱动程序，通常最好使用 </span><em><span>e1000</span></em><span>。mtu=</span><integer><span> (1 - 65520) mtu=</span><integer><span> （1 - 65520）Force MTU, for VirtIO only. Set to </span><em><span>1</span></em><span> to use the bridge MTU 强制 MTU，仅适用于 VirtIO。设置为 </span><em><span>1</span></em><span> 以使用桥接器 MTUqueues=</span><integer><span> (0 - 64) queues=</span><integer><span> （0 - 64）Number of packet queues to be used on the device. 要在设备上使用的数据包队列数。rate=</span><number><span> (0 - N) 率 =&lt;数字&gt; （0 - N）Rate limit in mbps (megabytes per second) as floating point number. 速率限制，以 mbps（兆字节/秒）为单位，作为浮点数。tag=</span><integer><span> (1 - 4094) 标签=</span><integer><span> （1 - 4094）VLAN tag to apply to packets on this interface. 要应用于此接口上的数据包的 VLAN 标记。trunks=&lt;vlanid[;vlanid...]&gt; trunks=&lt;vlanid[;弗拉尼德...]&gt;VLAN trunks to pass through this interface. 通过此接口的 VLAN 中继。</span></p></li><li><p><span>numa: </span><boolean><span> (</span><em><span>default =</span></em><span> 0) numa： </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Enable/disable NUMA. 启用/禁用 NUMA。</span></p></li><li><p><span>numa[n]: cpus=&lt;id[-id];...&gt; [,hostnodes=&lt;id[-id];...&gt;] [,memory=</span><number><span>] [,policy=&lt;preferred|bind|interleave&gt;] numa[n]： cpus=&lt;id[-id];...&gt; [，hostnodes=&lt;id[-id];...&gt;] [，memory=</span><number><span>] [，policy=&lt;preferred|bind|interleave&gt;]</span></p><p><span>NUMA topology. NUMA 拓扑。cpus=&lt;id[-id];...&gt;CPUs accessing this NUMA node. 访问此 NUMA 节点的 CPU。hostnodes=&lt;id[-id];...&gt;Host NUMA nodes to use. 要使用的主机 NUMA 节点。memory=</span><number><span> 内存=&lt;数字&gt;Amount of memory this NUMA node provides. 此 NUMA 节点提供的内存量。policy=&lt;bind | interleave | preferred&gt;NUMA allocation policy. NUMA 分配策略。</span></p></li><li><p><span>onboot: </span><boolean><span> (</span><em><span>default =</span></em><span> 0) onboot： </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Specifies whether a VM will be started during system bootup. 指定在系统启动期间是否启动 VM。</span></p></li><li><p><span>ostype: &lt;l24 | l26 | other | solaris | w2k | w2k3 | w2k8 | win10 | win11 | win7 | win8 | wvista | wxp&gt; ostype： &lt;l24 | l26 | 其他 | solaris | w2k | w2k3 | w2k8 | win10 | win11 | win7 | win8 | wvista | wxp&gt;</span></p><p><span>Specify guest operating system. This is used to enable special optimization/features for specific operating systems: 指定客户机操作系统。这用于为特定操作系统启用特殊优化/功能：other 其他 unspecified OS 未指定的操作系统wxp 西xp Microsoft Windows XP Microsoft Windows XP的w2k W2K的 Microsoft Windows 2000w2k3 Microsoft Windows 2003w2k8 W2K8的 Microsoft Windows 2008wvista WVISTA公司 Microsoft Windows Vistawin7 Win7的 Microsoft Windows 7win8 win8的 Microsoft Windows 8/2012/2012r2win10 Win10的 Microsoft Windows 10/2016/2019win11 Win11的 Microsoft Windows 11/2022/2025l24 Linux 2.4 Kernel Linux 2.4 内核l26 Linux 2.6 - 6.X Kernel Linux 2.6 - 6.X 内核solaris 索拉里斯 Solaris/OpenSolaris/OpenIndiania kernel Solaris/OpenSolaris/OpenIndiania 内核</span></p></li><li><p><span>parallel[n]: /dev/parport\d+|/dev/usb/lp\d+ 并行[N]： /dev/parport\d+|/dev/usb/lp\d+</span></p><p><span>Map host parallel devices (n is 0 to 2). 映射主机并行设备（n 为 0 到 2）。</span><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00Jb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ZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"><span>This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care. 此选项允许直接访问主机硬件。因此，无法再迁移此类机器 - 请特别小心使用。</span><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAKdUlEQVRoge1Ze1AV1x3+zt279wEi%0ADWCYGzRVktqa1MEmmtbWR22ncXxUrTDWV/5IqG2wUAUfmUwSkk6V+EAJCEQC6figwZBqZtRxqukf%0AtebRZBpFG1S0hiRErwiaKK977+6eX//YPXt37+UiIJlMZnpmdnb33PP4vt97z2VEhG9yc3zdAO60%0A/Z/A192+8QScX8Wifr+fWltbzffU1FT4fD72Vew15ASampqovr4eBw8eNPvGjRuHzMxMmj9//tCT%0AIKIhu958801yuVwEoNdr48aNNJT7EdHQEdi/fz/JshwTvLiKioqGlMSQLFJfX0+MMRvQsWNSqXLz%0AH2jez78fRWLTpk1DRuKOF6irqyOn02kDOP8XGdTz+VFSP91Hatu79NRvZ0SR2LJly5CQuKPJtbW1%0AJEmSDdivHp1AwctHSblYSsqFElLOF5PavIvWZU+LIrF169Y7JjHoibt3744CnzXrIQpeOUbKhVJS%0AmkpIPV9MyrnNpJwtIuVSNa15/MdRJLZt23ZHJBjRwIu5N954gxYvXgzOudm3aO5E1L5SBNZ1Hoxr%0AINLAyH6HJxVP/WkXtu9+37ZeSUkJVq9ePagQO+BMXFNTEwV+ybxHsPeVIjg6zwOkgSWNhuOuUUBC%0AKhxJY0AggDSgpwWbn1mO1csftq1ZUFCA0tLSQZXFA0pkVVVVlJOTA6vWsmY9hF07N0AS4OU48LgR%0AWLO+FPFxboxMS8G5hlPYmPMI4jwM1P0Jtj67DJyrKHvtNADdjPPz8+FwOCgvL29gmuivrVVUVESF%0AyqxZD1PoyjFSL+7QHbapm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kVJElCYWEhvF4v6urqzDVK9n2M%0Azu4Qnl5+L9q/7MHltgBWbr9kA5+eno7c3FzIsoyI5GrTeCzgosU8VmGMmSGLiEwSsixH2WNBQQEA%0A2EhUH/wc7330BaaOH479/2zHtS/CFabP58OaNWvg9Xp1EE4nZFmGLMtwu93wer1wuVy2ECpJko2I%0AiTNWJrZGI+HEwi6FisUVCAQQCASwZ88eVFZW9lk9JicnY/369fD5fPB4PCbo+Ph4k4TH44HL5YLX%0A64XX6zXH9EKE9aUBRkTEGLNJP1Kd4nI4HMjOzkZ8fDyKi4ttJ3eiJSYmYu3atRg1apQJzuv1wuPx%0AwOPxwOFwmEBFHnA6nXC5XGYSiywlbns2SnoDANN0hMNZnS0UCpkaOnPmDN566y20tLSY2ktLS8OM%0AGTOQkpICt9uNuLg4M2EJ8CJZSZJkZmFBwkrAWpH2+3BXEBEkRIhTVdVMOCL5qKqKy5cvQ1EUaJoG%0AVVWRnKx/Jlpt3eVy2QCKu9C68AFr9o0spwd0Oh1ZYggCIlNaiQktiXdhZgKQABcp3ci7LMtM7B0J%0AfsAErJoAYItG1mdr+hfvVlACtHDIXkploYXbHvQOikDEe6/ZmjFmAhf9ZvJxOk2Qol88W4kYz32S%0AGNQfHLG+TyMTkAVEr88xQfVnkBg7GAKixSIykDYQsL21/wFkW/B5QqT9lwAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Caution"><span>Experimental! User reported problems with this option. 实验的！用户报告了使用此选项的问题。</span></p></li><li><p><span>protection: </span><boolean><span> (</span><em><span>default =</span></em><span> 0) 保护： </span><boolean><span> （</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Sets the protection flag of the VM. This will disable the remove VM and remove disk operations. 设置 VM 的保护标志。这将禁用删除 VM 和删除磁盘操作。</span></p></li><li><p><span>reboot: </span><boolean><span> (</span><em><span>default =</span></em><span> 1) 重新启动： </span><boolean><span>（</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>Allow reboot. If set to </span><em><span>0</span></em><span> the VM exit on reboot. 允许重新启动。如果设置为 </span><em><span>0</span></em><span>，则 VM 将在重新启动时退出。</span></p></li><li><p><span>rng0: [source=]&lt;/dev/urandom|/dev/random|/dev/hwrng&gt; [,max_bytes=</span><integer><span>] [,period=</span><integer><span>] rng0： [source=]&lt;/dev/urandom|/dev/random|/dev/hwrng&gt; [，max_bytes=</span><integer><span>] [，period=</span><integer><span>]</span></p><p><span>Configure a VirtIO-based Random Number Generator. 配置基于 VirtIO 的随机数生成器。max_bytes=</span><integer><span> (</span><em><span>default =</span></em><span> 1024) max_bytes=</span><integer><span>（</span><em><span>默认值 =</span></em><span> 1024）Maximum bytes of entropy allowed to get injected into the guest every </span><em><span>period</span></em><span> milliseconds. Prefer a lower value when using </span><em><span>/dev/random</span></em><span> as source. Use 0 to disable limiting (potentially dangerous!). 每个</span><em><span>周期</span></em><span>毫秒允许注入客户机的最大熵字节数。使用 </span><em><span>/dev/random</span></em><span> 作为源时，首选较低的值。使用 0 禁用限制（潜在危险！period=</span><integer><span> (</span><em><span>default =</span></em><span> 1000) period=</span><integer><span>（</span><em><span>默认值 =</span></em><span> 1000）Every </span><em><span>period</span></em><span> milliseconds the entropy-injection quota is reset, allowing the guest to retrieve another </span><em><span>max_bytes</span></em><span> of entropy. 每</span><em><span>周期</span></em><span>毫秒，熵注入配额就会重置，从而允许客户机检索另一个</span><em><span>熵max_bytes</span></em><span>。source=&lt;/dev/hwrng | /dev/random | /dev/urandom&gt;The file on the host to gather entropy from. In most cases </span><em><span>/dev/urandom</span></em><span> should be preferred over </span><em><span>/dev/random</span></em><span> to avoid entropy-starvation issues on the host. Using urandom does </span><strong><span>not</span></strong><span> decrease security in any meaningful way, as it’s still seeded from real entropy, and the bytes provided will most likely be mixed with real entropy on the guest as well. </span><em><span>/dev/hwrng</span></em><span> can be used to pass through a hardware RNG from the host. 主机上要从中收集熵的文件。在大多数情况下，</span><em><span>/dev/urandom</span></em><span> 应该优先于 </span><em><span>/dev/random</span></em><span>，以避免主机上的熵饥饿问题。使用 urandom </span><strong><span>不会</span></strong><span>以任何有意义的方式降低安全性，因为它仍然是从真实熵中播种的，并且提供的字节很可能也会与客户机上的真实熵混合在一起。</span><em><span>/dev/hwrng</span></em><span> 可用于从主机传递硬件 RNG。</span></p></li><li><p><span>sata[n]: [file=]</span><volume><span> [,aio=&lt;native|threads|io_uring&gt;] [,backup=&lt;1|0&gt;] [,bps=</span><bps><span>] [,bps_max_length=</span><seconds><span>] [,bps_rd=</span><bps><span>] [,bps_rd_max_length=</span><seconds><span>] [,bps_wr=</span><bps><span>] [,bps_wr_max_length=</span><seconds><span>] [,cache=</span><enum><span>] [,cyls=</span><integer><span>] [,detect_zeroes=&lt;1|0&gt;] [,discard=&lt;ignore|on&gt;] [,format=</span><enum><span>] [,heads=</span><integer><span>] [,iops=</span><iops><span>] [,iops_max=</span><iops><span>] [,iops_max_length=</span><seconds><span>] [,iops_rd=</span><iops><span>] [,iops_rd_max=</span><iops><span>] [,iops_rd_max_length=</span><seconds><span>] [,iops_wr=</span><iops><span>] [,iops_wr_max=</span><iops><span>] [,iops_wr_max_length=</span><seconds><span>] [,mbps=</span><mbps><span>] [,mbps_max=</span><mbps><span>] [,mbps_rd=</span><mbps><span>] [,mbps_rd_max=</span><mbps><span>] [,mbps_wr=</span><mbps><span>] [,mbps_wr_max=</span><mbps><span>] [,media=&lt;cdrom|disk&gt;] [,replicate=&lt;1|0&gt;] [,rerror=&lt;ignore|report|stop&gt;] [,secs=</span><integer><span>] [,serial=</span><serial><span>] [,shared=&lt;1|0&gt;] [,size=</span><DiskSize><span>] [,snapshot=&lt;1|0&gt;] [,ssd=&lt;1|0&gt;] [,trans=&lt;none|lba|auto&gt;] [,werror=</span><enum><span>] [,wwn=</span><wwn><span>] SATA[n]： [文件=] [，aio=] [，备份=&lt;1 |0&gt;] [，bps=] [，bps_max_length=] [，bps_rd=] [，bps_rd_max_length=] [，bps_wr=] [，bps_wr_max_length=] [，cache=] [，cyls=] [，detect_zeroes=&lt;1 |0&gt;] [，discard=] [，format=] [，heads=] [，iops=] [，iops_max=] [，iops_max_length=] [，iops_rd=] [，iops_rd_max=] [，iops_rd_max_length=] </span>[<span>，iops_wr=</span>][，iops_wr_max=]<span> [，iops_wr_max_length=] [，mbps=] [，mbps_max=] [，mbps_rd=] [，mbps_rd_max=] [，mbps_wr=] [，mbps_wr_max=] [，media=] [，replicate=&lt;1 |0&gt;] [，rerror=] [，secs=] [，serial=] [，shared=&lt;1 |0&gt;] [，size=] [，snapshot=&lt;1 |0&gt;] [，ssd&lt;1 |0&gt;=] [，trans=] [，werror=] [，wwn=]</span></p><p><span>Use volume as SATA hard disk or CD-ROM (n is 0 to 5). 使用卷作为 SATA 硬盘或 CD-ROM（n 为 0 到 5）。aio=&lt;io_uring | native | threads&gt; aio=&lt;io_uring | 本机 | 线程&gt;AIO type to use. 要使用的 AIO 类型。backup=</span><boolean><span> 备份=</span><boolean><span>Whether the drive should be included when making backups. 进行备份时是否应包含驱动器。bps=</span><bps><span>Maximum r/w speed in bytes per second. 最大 r/w 速度（以字节/秒为单位）。bps_max_length=</span><seconds><span> bps_max_length=&lt;秒&gt;Maximum length of I/O bursts in seconds. I/O 突发的最大长度（以秒为单位）。bps_rd=</span><bps><span>Maximum read speed in bytes per second. 最大读取速度（以字节/秒为单位）。bps_rd_max_length=</span><seconds><span> bps_rd_max_length=&lt;秒&gt;Maximum length of read I/O bursts in seconds. 读取 I/O 突发的最大长度（以秒为单位）。bps_wr=</span><bps><span>Maximum write speed in bytes per second. 最大写入速度（以字节/秒为单位）。bps_wr_max_length=</span><seconds><span> bps_wr_max_length=&lt;秒&gt;Maximum length of write I/O bursts in seconds. 写入 I/O 突发的最大长度（以秒为单位）。cache=&lt;directsync | none | unsafe | writeback | writethrough&gt; cache=&lt;directsync | none | 不安全 | writeback | writethrough&gt;The drive’s cache mode 驱动器的缓存模式cyls=</span><integer><span>Force the drive’s physical geometry to have a specific cylinder count. 强制驱动器的物理几何形状具有特定的柱面计数。detect_zeroes=</span><boolean><span>Controls whether to detect and try to optimize writes of zeroes. 控制是否检测和尝试优化零的写入。discard=&lt;ignore | on&gt;Controls whether to pass discard/trim requests to the underlying storage. 控制是否将丢弃/修剪请求传递到底层存储。file=</span><volume><span> 文件=&lt;卷&gt;The drive’s backing volume. 驱动器的后备卷。format=&lt;cloop | cow | qcow | qcow2 | qed | raw | vmdk&gt;The drive’s backing file’s data format. 驱动器的备份文件的数据格式。heads=</span><integer><span>Force the drive’s physical geometry to have a specific head count. 强制驱动器的物理几何形状具有特定的磁头数。iops=</span><iops><span>Maximum r/w I/O in operations per second. 每秒操作中的最大 r/w I/O。iops_max=</span><iops><span>Maximum unthrottled r/w I/O pool in operations per second. 每秒操作中最大未受限制的 r/w I/O 池。iops_max_length=</span><seconds><span> iops_max_length=&lt;秒&gt;Maximum length of I/O bursts in seconds. I/O 突发的最大长度（以秒为单位）。iops_rd=</span><iops><span>Maximum read I/O in operations per second. 每秒操作中的最大读取 I/O。iops_rd_max=</span><iops><span>Maximum unthrottled read I/O pool in operations per second. 每秒操作中的最大不受限制的读取 I/O 池。iops_rd_max_length=</span><seconds><span> iops_rd_max_length=&lt;秒&gt;Maximum length of read I/O bursts in seconds. 读取 I/O 突发的最大长度（以秒为单位）。iops_wr=</span><iops><span>Maximum write I/O in operations per second. 每秒操作中的最大写入 I/O。iops_wr_max=</span><iops><span>Maximum unthrottled write I/O pool in operations per second. 每秒操作中的最大未限制写入 I/O 池。iops_wr_max_length=</span><seconds><span> iops_wr_max_length=&lt;秒&gt;Maximum length of write I/O bursts in seconds. 写入 I/O 突发的最大长度（以秒为单位）。mbps=</span><mbps><span>Maximum r/w speed in megabytes per second. 最大 r/w 速度（以兆字节/秒为单位）。mbps_max=</span><mbps><span>Maximum unthrottled r/w pool in megabytes per second. 最大未限制的 r/w 池（以兆字节/秒为单位）。mbps_rd=</span><mbps><span>Maximum read speed in megabytes per second. 最大读取速度（以兆字节/秒为单位）。mbps_rd_max=</span><mbps><span>Maximum unthrottled read pool in megabytes per second. 最大未限制读取池（以兆字节/秒为单位）。mbps_wr=</span><mbps><span>Maximum write speed in megabytes per second. 最大写入速度（以兆字节/秒为单位）。mbps_wr_max=</span><mbps><span>Maximum unthrottled write pool in megabytes per second. 最大未限制写入池（以兆字节/秒为单位）。media=&lt;cdrom | disk&gt; (</span><em><span>default =</span></em><span> disk) media=&lt;cdrom | disk&gt;（</span><em><span>默认值 =</span></em><span> 磁盘）The drive’s media type. 驱动器的介质类型。replicate=</span><boolean><span> (</span><em><span>default =</span></em><span> 1) replicate=</span><boolean><span>（</span><em><span>默认值 =</span></em><span> 1）Whether the drive should considered for replication jobs. 是否应考虑将驱动器用于复制作业。rerror=&lt;ignore | report | stop&gt; rerror=&lt;ignore | 报告 | stop&gt;Read error action. 读取错误操作。secs=</span><integer><span> 秒=</span><integer><span>Force the drive’s physical geometry to have a specific sector count. 强制驱动器的物理几何图形具有特定的扇区计数。serial=</span><serial><span> 序列号=&lt;序列号&gt;The drive’s reported serial number, url-encoded, up to 20 bytes long. 驱动器报告的序列号，URL 编码，最长 20 个字节。shared=</span><boolean><span> (</span><em><span>default =</span></em><span> 0) shared=</span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）Mark this locally-managed volume as available on all nodes. 将此本地管理的卷标记为在所有节点上都可用。</span><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAMVUlEQVRogdWZeXDVVZbHP7/f27JB%0AwtJIiCERRFlbx5FuHRrRBgtBsRIwCCOrFmGmiDBjYVNlQlgiQjU6IjI4xLJxGf5QGp0Cbaftsu3R%0Ahu6aYXqgLZoWEsjyyDP7S972e7/l3vnj5cW3Ji9M/zOn6lRS997fvd/vueece+59ipSS/89iv5mP%0AZEQQQsS23RQARVEAUFUVRVFQog0ZyogJSClld3c327Ztw7IsLMuKto90KgBsNhtVVVXMnj2bvLw8%0A7Ha7HBEJKWXGKoSQXV1dcsuWLfLSpUsyKkKIIdWyr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OygGIi%0AqTiHyMnuTBgz/bHHKDt9GillnN8D+P1+ysrKWLJkCdOmTWPWrFmUlpZGCAghpN/vp7m5mZqaGl5/%0A/XUKCwtJFLfbzX+sX8+Nr75K6rtZiXr49KVLKf/4Y4QQ6LqeBP6RRx6hvLycadOmMXPmTEpKSsjN%0Azf3uZS6WRHV1NadOnUpaTEpJa2sr5zZupOkmSaQqk2csWcLyTz4BQNO0uL7GxkbWr1+fErzNZlMG%0Aw1lVVSUvL4+SkhL27dvH8uXL8Xg8ceABiouLue+ttyieN2+IK2Z6TRx/5+LFacE3NDRQWVmZFjwk%0AnAOxJF566SW2bNnChQsXkmKipKSEB959l9vmzcvo1pZOpz/8ME98+mla8Bs2bGDZsmVpwUOa5/VE%0Ad0oXE319fXxWXs43Z88m9Q0n03/0I1YPJIRE8OfOnWPHjh2UlZUNCT4tgUQSO3fupKqqigceeGCw%0AP/a7VM8emUg0VcbK+fPn2bp1KytWrBgW/JAEEknU1NTw7LPPMn/+/GFBZQI8lZw/f57nnnuO5cuX%0AM2XKlGHBD0sgkURdXR2PP/44FRUVNwV+qP7Tp09z8ODBjNxmRAQSSRw4cIBly5axdOnSvwh4RVH4%0A4osv2L9/P2VlZRlbfkQEEkls376djo4OQqHE83bk4nK5EEKwZs0aSktLRwR+RATgOxItLS1cu3aN%0Avr6+wTfK/4tEfzeeMmUKkydPzhg8jJAAREgEg0H6+vrQNC2pFL8ZUVWVrKws8vPzycnJQVXVjH/s%0A/F/lgJiyQFHragAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Warning"><span>This option does not share the volume automatically, it assumes it is shared already! 此选项不会自动共享卷，而是假定它已经共享！size=</span><DiskSize><span> 大小=</span><iskSize><span>Disk size. This is purely informational and has no effect. 磁盘大小。这纯粹是信息性的，没有任何效果。snapshot=</span><boolean><span> 快照=</span><boolean><span>Controls qemu’s snapshot mode feature. If activated, changes made to the disk are temporary and will be discarded when the VM is shutdown. 控制 qemu 的快照模式功能。如果激活，对磁盘所做的更改是临时的，并且在 VM 关闭时将被丢弃。ssd=</span><boolean><span>Whether to expose this drive as an SSD, rather than a rotational hard disk. 是否将此驱动器公开为 SSD，而不是旋转硬盘。trans=&lt;auto | lba | none&gt;Force disk geometry bios translation mode. 强制磁盘几何 bios 转换模式。werror=&lt;enospc | ignore | report | stop&gt; werror=&lt;enospc | 忽略 | 报告 | stop&gt;Write error action. 写入错误操作。wwn=</span><wwn><span>The drive’s worldwide name, encoded as 16 bytes hex string, prefixed by </span><em><span>0x</span></em><span>. 驱动器的全球名称，编码为 16 字节十六进制字符串，以 </span><em><span>0x</span></em><span> 为前缀。</span></p></li><li><p><span>scsi[n]: [file=]</span><volume><span> [,aio=&lt;native|threads|io_uring&gt;] [,backup=&lt;1|0&gt;] [,bps=</span><bps><span>] [,bps_max_length=</span><seconds><span>] [,bps_rd=</span><bps><span>] [,bps_rd_max_length=</span><seconds><span>] [,bps_wr=</span><bps><span>] [,bps_wr_max_length=</span><seconds><span>] [,cache=</span><enum><span>] [,cyls=</span><integer><span>] [,detect_zeroes=&lt;1|0&gt;] [,discard=&lt;ignore|on&gt;] [,format=</span><enum><span>] [,heads=</span><integer><span>] [,iops=</span><iops><span>] [,iops_max=</span><iops><span>] [,iops_max_length=</span><seconds><span>] [,iops_rd=</span><iops><span>] [,iops_rd_max=</span><iops><span>] [,iops_rd_max_length=</span><seconds><span>] [,iops_wr=</span><iops><span>] [,iops_wr_max=</span><iops><span>] [,iops_wr_max_length=</span><seconds><span>] [,iothread=&lt;1|0&gt;] [,mbps=</span><mbps><span>] [,mbps_max=</span><mbps><span>] [,mbps_rd=</span><mbps><span>] [,mbps_rd_max=</span><mbps><span>] [,mbps_wr=</span><mbps><span>] [,mbps_wr_max=</span><mbps><span>] [,media=&lt;cdrom|disk&gt;] [,product=</span><product><span>] [,queues=</span><integer><span>] [,replicate=&lt;1|0&gt;] [,rerror=&lt;ignore|report|stop&gt;] [,ro=&lt;1|0&gt;] [,scsiblock=&lt;1|0&gt;] [,secs=</span><integer><span>] [,serial=</span><serial><span>] [,shared=&lt;1|0&gt;] [,size=</span><DiskSize><span>] [,snapshot=&lt;1|0&gt;] [,ssd=&lt;1|0&gt;] [,trans=&lt;none|lba|auto&gt;] [,vendor=</span><vendor><span>] [,werror=</span><enum><span>] [,wwn=</span><wwn><span>] scsi[n]： [文件=] [，aio=] [，备份=&lt;1 |0&gt;] [，bps=] [，bps_max_length=] [，bps_rd=] [，bps_rd_max_length=] [，bps_wr=] [，bps_wr_max_length=] [，cache=] [，cyls=] [，detect_zeroes=&lt;1 |0&gt;] [，discard=] [，format=] [，heads=] [，iops=] [，iops_max=] [，iops_max_length=] [，iops_rd=] [，iops_rd_max=] [，iops_rd_max_length=] </span>[<span>，iops_wr=</span>][，iops_wr_max=]<span> [，iops_wr_max_length=] [，iothread&lt;1 |0&gt;=] [，mbps=] [，mbps_max=] [，mbps_rd=] [，mbps_rd_max=] [，mbps_wr=] [，mbps_wr_max=] [，media=] [，product=] [，queues=] [，replicate&lt;1 |0&gt;=] [，rerror=] [，ro=&lt;1 |0&gt;] [，scsiblock=&lt;1 |0&gt;] [，secs=] [，serial=] [，shared=&lt;1 |0&gt;] [，size=] [，snapshot=&lt;1 |0&gt;] [，ssd&lt;1 |0&gt;=] [，trans=] [，vendor=] [，werror=] [，wwn=]</span></p><p><span>Use volume as SCSI hard disk or CD-ROM (n is 0 to 30). 使用卷作为 SCSI 硬盘或 CD-ROM（n 为 0 到 30）。aio=&lt;io_uring | native | threads&gt; aio=&lt;io_uring | 本机 | 线程&gt;AIO type to use. 要使用的 AIO 类型。backup=</span><boolean><span> 备份=</span><boolean><span>Whether the drive should be included when making backups. 进行备份时是否应包含驱动器。bps=</span><bps><span>Maximum r/w speed in bytes per second. 最大 r/w 速度（以字节/秒为单位）。bps_max_length=</span><seconds><span> bps_max_length=&lt;秒&gt;Maximum length of I/O bursts in seconds. I/O 突发的最大长度（以秒为单位）。bps_rd=</span><bps><span>Maximum read speed in bytes per second. 最大读取速度（以字节/秒为单位）。bps_rd_max_length=</span><seconds><span> bps_rd_max_length=&lt;秒&gt;Maximum length of read I/O bursts in seconds. 读取 I/O 突发的最大长度（以秒为单位）。bps_wr=</span><bps><span>Maximum write speed in bytes per second. 最大写入速度（以字节/秒为单位）。bps_wr_max_length=</span><seconds><span> bps_wr_max_length=&lt;秒&gt;Maximum length of write I/O bursts in seconds. 写入 I/O 突发的最大长度（以秒为单位）。cache=&lt;directsync | none | unsafe | writeback | writethrough&gt; cache=&lt;directsync | none | 不安全 | writeback | writethrough&gt;The drive’s cache mode 驱动器的缓存模式cyls=</span><integer><span>Force the drive’s physical geometry to have a specific cylinder count. 强制驱动器的物理几何形状具有特定的柱面计数。detect_zeroes=</span><boolean><span>Controls whether to detect and try to optimize writes of zeroes. 控制是否检测和尝试优化零的写入。discard=&lt;ignore | on&gt;Controls whether to pass discard/trim requests to the underlying storage. 控制是否将丢弃/修剪请求传递到底层存储。file=</span><volume><span> 文件=&lt;卷&gt;The drive’s backing volume. 驱动器的后备卷。format=&lt;cloop | cow | qcow | qcow2 | qed | raw | vmdk&gt;The drive’s backing file’s data format. 驱动器的备份文件的数据格式。heads=</span><integer><span>Force the drive’s physical geometry to have a specific head count. 强制驱动器的物理几何形状具有特定的磁头数。iops=</span><iops><span>Maximum r/w I/O in operations per second. 每秒操作中的最大 r/w I/O。iops_max=</span><iops><span>Maximum unthrottled r/w I/O pool in operations per second. 每秒操作中最大未受限制的 r/w I/O 池。iops_max_length=</span><seconds><span> iops_max_length=&lt;秒&gt;Maximum length of I/O bursts in seconds. I/O 突发的最大长度（以秒为单位）。iops_rd=</span><iops><span>Maximum read I/O in operations per second. 每秒操作中的最大读取 I/O。iops_rd_max=</span><iops><span>Maximum unthrottled read I/O pool in operations per second. 每秒操作中的最大不受限制的读取 I/O 池。iops_rd_max_length=</span><seconds><span> iops_rd_max_length=&lt;秒&gt;Maximum length of read I/O bursts in seconds. 读取 I/O 突发的最大长度（以秒为单位）。iops_wr=</span><iops><span>Maximum write I/O in operations per second. 每秒操作中的最大写入 I/O。iops_wr_max=</span><iops><span>Maximum unthrottled write I/O pool in operations per second. 每秒操作中的最大未限制写入 I/O 池。iops_wr_max_length=</span><seconds><span> iops_wr_max_length=&lt;秒&gt;Maximum length of write I/O bursts in seconds. 写入 I/O 突发的最大长度（以秒为单位）。iothread=</span><boolean><span>Whether to use iothreads for this drive 是否对此驱动器使用 iothreadsmbps=</span><mbps><span>Maximum r/w speed in megabytes per second. 最大 r/w 速度（以兆字节/秒为单位）。mbps_max=</span><mbps><span>Maximum unthrottled r/w pool in megabytes per second. 最大未限制的 r/w 池（以兆字节/秒为单位）。mbps_rd=</span><mbps><span>Maximum read speed in megabytes per second. 最大读取速度（以兆字节/秒为单位）。mbps_rd_max=</span><mbps><span>Maximum unthrottled read pool in megabytes per second. 最大未限制读取池（以兆字节/秒为单位）。mbps_wr=</span><mbps><span>Maximum write speed in megabytes per second. 最大写入速度（以兆字节/秒为单位）。mbps_wr_max=</span><mbps><span>Maximum unthrottled write pool in megabytes per second. 最大未限制写入池（以兆字节/秒为单位）。media=&lt;cdrom | disk&gt; (</span><em><span>default =</span></em><span> disk) media=&lt;cdrom | disk&gt;（</span><em><span>默认值 =</span></em><span> 磁盘）The drive’s media type. 驱动器的介质类型。product=</span><product><span> 产品=&lt;产品&gt;The drive’s product name, up to 16 bytes long. 驱动器的产品名称，长度不超过 16 个字节。queues=</span><integer><span> (2 - N) queues=</span><integer><span> （2 - N）Number of queues. 队列数。replicate=</span><boolean><span> (</span><em><span>default =</span></em><span> 1) replicate=</span><boolean><span>（</span><em><span>默认值 =</span></em><span> 1）Whether the drive should considered for replication jobs. 是否应考虑将驱动器用于复制作业。rerror=&lt;ignore | report | stop&gt; rerror=&lt;ignore | 报告 | stop&gt;Read error action. 读取错误操作。ro=</span><boolean><span>Whether the drive is read-only. 驱动器是否为只读。scsiblock=</span><boolean><span> (</span><em><span>default =</span></em><span> 0) scsiblock=</span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）whether to use scsi-block for full passthrough of host block device 是否使用 SCSI-Block 对主机块设备进行完全直通</span><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAMVUlEQVRogdWZeXDVVZbHP7/f27JB%0AwtJIiCERRFlbx5FuHRrRBgtBsRIwCCOrFmGmiDBjYVNlQlgiQjU6IjI4xLJxGf5QGp0Cbaftsu3R%0Ahu6aYXqgLZoWEsjyyDP7S972e7/l3vnj5cW3Ji9M/zOn6lRS997fvd/vueece+59ipSS/89iv5mP%0AZEQQQsS23RQARVEAUFUVRVFQog0ZyogJSClld3c327Ztw7IsLMuKto90KgBsNhtVVVXMnj2bvLw8%0A7Ha7HBEJKWXGKoSQXV1dcsuWLfLSpUsyKkKIIdWyrLTqdrvlU089Jc+cOSM9Ho8Mh8NSCCEzxTRi%0A8JWVlbKtre0vAt6yLGmapmxtbZXr1q2TZ86ckW1tbSMikTH4GzduyKqqqkHwsSA1TZOhUChOg8Hg%0AoBqGIQ3DSAk+VleuXDliEspwviullD09PbzwwgscO3Yszt91XScQCNDZ2YlhGIPfuFwu7Pb48FJV%0AlZycnEG/z8/PRwiBqqqDYzweD88//zyrV69m7ty5jBs3DofDMWRgD0lASik9Hg979uzh2LFjcYEa%0ACoVob2/n2q9+hbZ585BGSCWltbVMr61NtSYbN25k7dq1zJkzZ1gSaqrGWPD79+9PAh8MBuns7OTi%0Ae+8R2rwZCYOaqTTt3cuf6+qSwAMcP36co0eP8vXXX9Pd3Y1hGMg0lk65A1HwdXV1vPHGG0mW7+jo%0A4A8/+xn2BAAAI0riQOnu3cyork7Zt3btWtavX89dd92VdieSCEgppdvt5sCBAxw5ciSuLxQK0dTU%0ARMOHHyJ37hwh1NSiAKU7djDzxRdT9q9YsYJt27YxY8aMlCTiCEgp5eXLl6mvr+fVV1+NmygYDNLW%0A1sY3J09ipLEYQDPw2sBfCTwMLARKgKwhiNxWU8OsXbvi2qLYnnzySSorK1PvRGyqvH79uty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lZRlbfkQEEkls376djo4OQqHE83bk4nK5EEKwZs0aSktLRwR+RATgOxItLS1cu3aN%0Avr6+wTfK/4tEfzeeMmUKkydPzhg8jJAAREgEg0H6+vrQNC2pFL8ZUVWVrKws8vPzycnJQVXVjH/s%0A/F/lgJiyQFHragAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Warning"><span>can lead to I/O errors in combination with low memory or high memory fragmentation on host 可能导致 I/O 错误与主机上的内存不足或内存碎片不足相结合secs=</span><integer><span> 秒=</span><integer><span>Force the drive’s physical geometry to have a specific sector count. 强制驱动器的物理几何图形具有特定的扇区计数。serial=</span><serial><span> 序列号=&lt;序列号&gt;The drive’s reported serial number, url-encoded, up to 20 bytes long. 驱动器报告的序列号，URL 编码，最长 20 个字节。shared=</span><boolean><span> (</span><em><span>default =</span></em><span> 0) shared=</span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）Mark this locally-managed volume as available on all nodes. 将此本地管理的卷标记为在所有节点上都可用。</span><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAMVUlEQVRogdWZeXDVVZbHP7/f27JB%0AwtJIiCERRFlbx5FuHRrRBgtBsRIwCCOrFmGmiDBjYVNlQlgiQjU6IjI4xLJxGf5QGp0Cbaftsu3R%0Ahu6aYXqgLZoWEsjyyDP7S972e7/l3vnj5cW3Ji9M/zOn6lRS997fvd/vueece+59ipSS/89iv5mP%0AZEQQQsS23RQARVEAUFUVRVFQog0ZyogJSClld3c327Ztw7IsLMuKto90KgBsNhtVVVXMnj2bvLw8%0A7Ha7HBEJKWXGKoSQXV1dcsuWLfLSpUsyKkKIIdWyrLTqdrvlU089Jc+cOSM9Ho8Mh8NSCCEzxTRi%0A8JWVlbKtre0vAt6yLGmapmxtbZXr1q2TZ86ckW1tbSMikTH4GzduyKqqqkHwsSA1TZOhUChOg8Hg%0AoBqGIQ3DSAk+VleuXDliEspwviullD09PbzwwgscO3Yszt91XScQCNDZ2Y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3uZS6WRHV1NadOnUpaTEpJa2sr5zZupOkmSaQqk2csWcLyTz4BQNO0uL7GxkbWr1+fErzNZlMG%0Aw1lVVSUvL4+SkhL27dvH8uXL8Xg8ceABiouLue+ttyieN2+IK2Z6TRx/5+LFacE3NDRQWVmZFjwk%0AnAOxJF566SW2bNnChQsXkmKipKSEB959l9vmzcvo1pZOpz/8ME98+mla8Bs2bGDZsmVpwUOa5/VE%0Ad0oXE319fXxWXs43Z88m9Q0n03/0I1YPJIRE8OfOnWPHjh2UlZUNCT4tgUQSO3fupKqqigceeGCw%0AP/a7VM8emUg0VcbK+fPn2bp1KytWrBgW/JAEEknU1NTw7LPPMn/+/GFBZQI8lZw/f57nnnuO5cuX%0AM2XKlGHBD0sgkURdXR2PP/44FRUVNwV+qP7Tp09z8ODBjNxmRAQSSRw4cIBly5axdOnSvwh4RVH4%0A4osv2L9/P2VlZRlbfkQEEkls376djo4OQqHE83bk4nK5EEKwZs0aSktLRwR+RATgOxItLS1cu3aN%0Avr6+wTfK/4tEfzeeMmUKkydPzhg8jJAAREgEg0H6+vrQNC2pFL8ZUVWVrKws8vPzycnJQVXVjH/s%0A/F/lgJiyQFHragAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Warning"><span>This option does not share the volume automatically, it assumes it is shared already! 此选项不会自动共享卷，而是假定它已经共享！size=</span><DiskSize><span> 大小=</span><iskSize><span>Disk size. This is purely informational and has no effect. 磁盘大小。这纯粹是信息性的，没有任何效果。snapshot=</span><boolean><span> 快照=</span><boolean><span>Controls qemu’s snapshot mode feature. If activated, changes made to the disk are temporary and will be discarded when the VM is shutdown. 控制 qemu 的快照模式功能。如果激活，对磁盘所做的更改是临时的，并且在 VM 关闭时将被丢弃。ssd=</span><boolean><span>Whether to expose this drive as an SSD, rather than a rotational hard disk. 是否将此驱动器公开为 SSD，而不是旋转硬盘。trans=&lt;auto | lba | none&gt;Force disk geometry bios translation mode. 强制磁盘几何 bios 转换模式。vendor=</span><vendor><span> 供应商 = &lt;供应商&gt;The drive’s vendor name, up to 8 bytes long. 驱动器的供应商名称，长度不超过 8 个字节。werror=&lt;enospc | ignore | report | stop&gt; werror=&lt;enospc | 忽略 | 报告 | stop&gt;Write error action. 写入错误操作。wwn=</span><wwn><span>The drive’s worldwide name, encoded as 16 bytes hex string, prefixed by </span><em><span>0x</span></em><span>. 驱动器的全球名称，编码为 16 字节十六进制字符串，以 </span><em><span>0x</span></em><span> 为前缀。</span></p></li><li><p><span>scsihw: &lt;lsi | lsi53c810 | megasas | pvscsi | virtio-scsi-pci | virtio-scsi-single&gt; (</span><em><span>default =</span></em><span> lsi) scsihw： &lt;lsi | lsi53c810 | megasas | pvscsi | virtio-scsi-pci | virtio-scsi-single&gt;（</span><em><span>默认值 =</span></em><span> lsi）</span></p><p><span>SCSI controller model SCSI 控制器型号</span></p></li><li><p><span>searchdomain: </span><string><span> 搜索域： </span><string></p><p><span>cloud-init: Sets DNS search domains for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set. cloud-init：设置容器的DNS搜索域。如果 searchdomain 和 nameserver 均未设置，Create 将自动使用主机的设置。</span></p></li><li><p><span>serial[n]: (/dev/.+|socket) serial[n]： （/dev/.+|套接字）</span></p><p><span>Create a serial device inside the VM (n is 0 to 3), and pass through a host serial device (i.e. /dev/ttyS0), or create a unix socket on the host side (use </span><em><span>qm terminal</span></em><span> to open a terminal connection). 在虚拟机内部创建一个串口设备（n 为 0 到 3），并直通一个主机串口设备（即 /dev/ttyS0），或者在主机侧创建一个 unix 套接字（使用 </span><em><span>qm terminal</span></em><span> 打开一个终端连接）。</span><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAJhUlEQVRoge2ZWWycVxXHf+fce7/v%0Am/GaGCde4pI0aQlJC0kRtE1L00JbLIjY4QkeUB9YHhAIJFCExAsKUkE8IAFFPIDUIqhBRSDRBUqC%0ACimFFBCBpCWx02IaZ3G2SdyxPZ7vHh6+mcnSZnFj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icy="no-referrer" alt="Note"><span>If you pass through a host serial device, it is no longer possible to migrate such machines - use with special care. 如果您通过主机串行设备，则无法再迁移此类计算机 - 请特别小心使用。</span><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAKdUlEQVRoge1Ze1AV1x3+zt279wEi%0ADWCYGzRVktqa1MEmmtbWR22ncXxUrTDWV/5IqG2wUAUfmUwSkk6V+EAJCEQC6figwZBqZtRxqukf%0AtebRZBpFG1S0hiRErwiaKK977+6eX//YPXt37+UiIJlMZnpmdnb33PP4vt97z2VEhG9yc3zdAO60%0A/Z/A192+8QScX8Wifr+fWltbzffU1FT4fD72Vew15ASampqovr4eBw8eNPvGjRuHzMxMmj9//tCT%0AIKIhu958801yuVwEoNdr48aNNJT7EdHQEdi/fz/JshwTvLiKioqGlMSQLFJfX0+MMRvQsWNSqXLz%0AH2jez78fRWLTpk1DRuKOF6irqyOn02kDOP8XGdTz+VFSP91Hatu79NRvZ0SR2LJly5CQuKPJtbW1%0AJEmSDdivHp1AwctHSblYSsqFElLOF5PavIvWZU+LIrF169Y7JjHoibt3744CnzXrIQpeOUbKhVJS%0AmkpIPV9MyrnNpJwtIuVSNa15/MdRJLZt23ZHJBjRwIu5N954gxYvXgzOudm3aO5E1L5SBNZ1Hoxr%0AINLAyH6HJxVP/WkXtu9+37ZeSUkJVq9ePagQO+BMXFNTEwV+ybxHsPeVIjg6zwOkgSWNhuOuUUBC%0AKhxJY0AggDSgpwWbn1mO1csftq1ZUFCA0tLSQZXFA0pkVVVVlJOTA6vWsmY9hF07N0AS4OU48LgR%0AWLO+FPFxboxMS8G5hlPYmPMI4jwM1P0Jtj67DJyrKHvtNADdjPPz8+FwOCgvL29gmuivrVVUVESF%0AyqxZD1PoyjFSL+7QHbapmJTml+n9EzVRtl676ZekNKwl5VQ+KSfzKHR2E+UutodYxhiVl5cPyCf6%0AZUJlZWWUm5trk/wTi6bgtVdf1M2Gq2DEwUgDNBWhUDB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QEA%0A2EhUH/wc7330BaaOH479/2zHtS/CFabP58OaNWvg9Xp1EE4nZFmGLMtwu93wer1wuVy2ECpJko2I%0AiTNWJrZGI+HEwi6FisUVCAQQCASwZ88eVFZW9lk9JicnY/369fD5fPB4PCbo+Ph4k4TH44HL5YLX%0A64XX6zXH9EKE9aUBRkTEGLNJP1Kd4nI4HMjOzkZ8fDyKi4ttJ3eiJSYmYu3atRg1apQJzuv1wuPx%0AwOPxwOFwmEBFHnA6nXC5XGYSiywlbns2SnoDANN0hMNZnS0UCpkaOnPmDN566y20tLSY2ktLS8OM%0AGTOQkpICt9uNuLg4M2EJ8CJZSZJkZmFBwkrAWpH2+3BXEBEkRIhTVdVMOCL5qKqKy5cvQ1EUaJoG%0AVVWRnKx/Jlpt3eVy2QCKu9C68AFr9o0spwd0Oh1ZYggCIlNaiQktiXdhZgKQABcp3ci7LMtM7B0J%0AfsAErJoAYItG1mdr+hfvVlACtHDIXkploYXbHvQOikDEe6/ZmjFmAhf9ZvJxOk2Qol88W4kYz32S%0AGNQfHLG+TyMTkAVEr88xQfVnkBg7GAKixSIykDYQsL21/wFkW/B5QqT9lwAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Caution"><span>Experimental! User reported problems with this option. 实验的！用户报告了使用此选项的问题。</span></p></li><li><p><span>shares: </span><integer><span> (0 - 50000) (</span><em><span>default =</span></em><span> 1000) shares： </span><integer><span> （0 - 50000） （</span><em><span>default =</span></em><span> 1000）</span></p><p><span>Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. Number is relative to weights of all other running VMs. Using zero disables auto-ballooning. Auto-ballooning is done by pvestatd. 用于自动膨胀的内存份额量。数字越大，此 VM 获得的内存就越多。该数字与所有其他正在运行的 VM 的权重相关。使用零将禁用自动膨胀。自动气球是由 pvestatd 完成的。</span></p></li><li><p><span>smbios1: [base64=&lt;1|0&gt;] [,family=</span><Base64 encoded string><span>] [,manufacturer=</span><Base64 encoded string><span>] [,product=</span><Base64 encoded string><span>] [,serial=</span><Base64 encoded string><span>] [,sku=</span><Base64 encoded string><span>] [,uuid=</span><UUID><span>] [,version=</span><Base64 encoded string><span>] smbios1： [base64=&lt;1|0&gt;] [，family=&lt;Base64 编码字符串&gt;] [，manufacturer=&lt;Base64 编码字符串&gt;] [，product=&lt;Base64 编码字符串&gt;] [，serial=&lt;Base64 编码字符串&gt;] [，sku=&lt;Base64 编码字符串&gt;] [，uuid=</span><UUID><span>] [，version=&lt;Base64 编码字符串&gt;]</span></p><p><span>Specify SMBIOS type 1 fields. 指定 SMBIOS 类型 1 字段。base64=</span><boolean><span>Flag to indicate that the SMBIOS values are base64 encoded 指示 SMBIOS 值是 base64 编码的标志family=</span><Base64 encoded string><span> family=&lt;Base64 编码字符串&gt;Set SMBIOS1 family string. 设置SMBIOS1系列字符串。manufacturer=</span><Base64 encoded string><span> manufacturer=&lt;Base64 编码字符串&gt;Set SMBIOS1 manufacturer. 设置SMBIOS1制造商。product=</span><Base64 encoded string><span> product=&lt;Base64 编码字符串&gt;Set SMBIOS1 product ID. 设置SMBIOS1产品 ID。serial=</span><Base64 encoded string><span> serial=&lt;Base64 编码字符串&gt;Set SMBIOS1 serial number. 设置SMBIOS1序列号。sku=</span><Base64 encoded string><span> sku=&lt;Base64 编码字符串&gt;Set SMBIOS1 SKU string. 设置SMBIOS1 SKU 字符串。uuid=</span><UUID><span>Set SMBIOS1 UUID. 设置SMBIOS1 UUID。version=</span><Base64 encoded string><span> version=&lt;Base64 编码字符串&gt;Set SMBIOS1 version. 设置SMBIOS1版本。</span></p></li><li><p><span>smp: </span><integer><span> (1 - N) (</span><em><span>default =</span></em><span> 1) smp： </span><integer><span> （1 - N） （</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>The number of CPUs. Please use option -sockets instead. CPU 的数量。请改用选项 -sockets。</span></p></li><li><p><span>sockets: </span><integer><span> (1 - N) (</span><em><span>default =</span></em><span> 1) 套接字： </span><integer><span> （1 - N） （</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>The number of CPU sockets. CPU 插槽的数量。</span></p></li><li><p><span>spice_enhancements: [foldersharing=&lt;1|0&gt;] [,videostreaming=&lt;off|all|filter&gt;] spice_enhancements： [foldersharing=&lt;1|0&gt;] [，videostreaming=&lt;off|all|filter&gt;]</span></p><p><span>Configure additional enhancements for SPICE. 配置 SPICE 的其他增强功能。foldersharing=</span><boolean><span> (</span><em><span>default =</span></em><span> 0) foldersharing=</span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）Enable folder sharing via SPICE. Needs Spice-WebDAV daemon installed in the VM. 通过 SPICE 启用文件夹共享。需要在 VM 中安装 Spice-WebDAV 守护程序。videostreaming=&lt;all | filter | off&gt; (</span><em><span>default =</span></em><span> off) videostreaming=&lt;all | filter | off&gt;（</span><em><span>默认值 =</span></em><span> off）Enable video streaming. Uses compression for detected video streams. 启用视频流。对检测到的视频流使用压缩。</span></p></li><li><p><span>sshkeys: </span><string><span> sshkeys： </span><string></p><p><span>cloud-init: Setup public SSH keys (one key per line, OpenSSH format). cloud-init：设置公有 SSH 密钥（每行一个密钥，OpenSSH 格式）。</span></p></li><li><p><span>startdate: (now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS) (</span><em><span>default =</span></em><span> now) 开始日期：（现在 |YYYY-MM-DD |YYYY-MM-DDTHH：MM：SS） </span><em><span>（默认值 =</span></em><span> 现在）</span></p><p><span>Set the initial date of the real time clock. Valid format for date are:&#39;now&#39; or </span><em><span>2006-06-17T16:01:21</span></em><span> or </span><em><span>2006-06-17</span></em><span>. 设置实时时钟的初始日期。日期的有效格式为：“现在”或 </span><em><span>2006-06-17T16：01：21</span></em><span> 或 </span><em><span>2006-06-17</span></em><span>。</span></p></li><li><p><span>startup: </span><code>[[order=]\d+] [,up=\d+] [,down=\d+]</code><span> 启动： &#39;[[order=]\d+] [，up=\d+] [，down=\d+] &#39;</span></p><p><span>Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the </span><em><span>up</span></em><span> or </span><em><span>down</span></em><span> delay in seconds, which specifies a delay to wait before the next VM is started or stopped. 启动和关闭行为。Order 是一个非负数，用于定义一般启动顺序。通过反向排序完成关机。此外，还可以设置</span><em><span>启动</span></em><span>或</span><em><span>关闭</span></em><span>延迟（以秒为单位），这指定了在启动或停止下一个 VM 之前要等待的延迟。</span></p></li><li><p><span>tablet: </span><boolean><span> (</span><em><span>default =</span></em><span> 1) tablet： </span><boolean><span> （</span><em><span>默认值 =</span></em><span> 1）</span></p><p><span>Enable/disable the USB tablet device. This device is usually needed to allow absolute mouse positioning with VNC. Else the mouse runs out of sync with normal VNC clients. If you’re running lots of console-only guests on one host, you may consider disabling this to save some context switches. This is turned off by default if you use spice (qm set </span><vmid><span> --vga qxl). 启用/禁用 USB 平板电脑设备。通常需要此设备来允许使用 VNC 对鼠标进行绝对定位。否则，鼠标将与正常的 VNC 客户端不同步。如果您在一台主机上运行大量仅限控制台的来宾，则可以考虑禁用此功能以节省一些上下文切换。如果您使用 spice （qm set </span><vmid><span> --vga qxl），则默认情况下会关闭此功能。</span></p></li><li><p><span>tags: </span><string><span> 标签： </span><string></p><p><span>Tags of the VM. This is only meta information. VM 的标记。这只是元信息。</span></p></li><li><p><span>tdf: </span><boolean><span> (</span><em><span>default =</span></em><span> 0) tdf： </span><boolean><span> （</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Enable/disable time drift fix. 启用/禁用时间漂移修复。</span></p></li><li><p><span>template: </span><boolean><span> (</span><em><span>default =</span></em><span> 0) 模板： </span><boolean><span> （</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Enable/disable Template. 启用/禁用模板。</span></p></li><li><p><span>tpmstate0: [file=]</span><volume><span> [,size=</span><DiskSize><span>] [,version=&lt;v1.2|v2.0&gt;] tpmstate0： [file=]</span><volume><span> [，size=</span><DiskSize><span>] [，version=&lt;v1.2|v2.0&gt;]</span></p><p><span>Configure a Disk for storing TPM state. The format is fixed to </span><em><span>raw</span></em><span>. 配置用于存储 TPM 状态的磁盘。格式固定为</span><em><span>原始</span></em><span>格式。file=</span><volume><span> 文件=&lt;卷&gt;The drive’s backing volume. 驱动器的后备卷。size=</span><DiskSize><span> 大小=</span><iskSize><span>Disk size. This is purely informational and has no effect. 磁盘大小。这纯粹是信息性的，没有任何效果。version=&lt;v1.2 | v2.0&gt; (</span><em><span>default =</span></em><span> v1.2) version=&lt;v1.2 | v2.0&gt;（</span><em><span>默认值 =</span></em><span> v1.2）The TPM interface version. v2.0 is newer and should be preferred. Note that this cannot be changed later on. TPM 接口版本。v2.0 较新，应优先使用。请注意，以后无法更改此设置。</span></p></li><li><p><span>unused[n]: [file=]</span><volume><span> 未使用[n]： [文件=]&lt;体积&gt;</span></p><p><span>Reference to unused volumes. This is used internally, and should not be modified manually. 对未使用卷的引用。这是在内部使用的，不应手动修改。file=</span><volume><span> 文件=&lt;卷&gt;The drive’s backing volume. 驱动器的后备卷。</span></p></li><li><p><span>usb[n]: [[host=]&lt;HOSTUSBDEVICE|spice&gt;] [,mapping=</span><mapping-id><span>] [,usb3=&lt;1|0&gt;] usb[n]： [[host=]&lt;HOSTUSBDEVICE|spice&gt;] [，mapping=</span><mapping-id><span>] [，usb3=&lt;1|0&gt;]</span></p><p><span>Configure an USB device (n is 0 to 4, for machine version &gt;= 7.1 and ostype l26 or windows &gt; 7, n can be up to 14). 配置 USB 设备（n 为 0 到 4，对于计算机版本 &gt;= 7.1 和 ostype l26 或 Windows &gt; 7，n 最多为 14）。host=&lt;HOSTUSBDEVICE|spice&gt;The Host USB device or port or the value </span><em><span>spice</span></em><span>. HOSTUSBDEVICE syntax is: 主机 USB 设备或端口或值 </span><em><span>spice</span></em><span>。HOSTUSBDEVICE 语法为：</span><code>&#39;bus-port(.port)*&#39; (decimal numbers) or &#39;vendor_id:product_id&#39; (hexadeciaml numbers) or &#39;spice&#39;</code><span>You can use the </span><em><span>lsusb -t</span></em><span> command to list existing usb devices. 您可以使用 </span><em><span>lsusb -t</span></em><span> 命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a9fS29tL%0AlmUMDQ1RKpXOm9EXvV6v1+tWr9eZnp5mZmaGWq1GjLHF62aiNZ+bnPfe45xrvTZzxMyYmZk56+LX%0AzKjX661DvHOOJElIkoRSqYT3/vLvRlW15eHCa4VxzdvmpjZDfubzuXeb3vuzqCEixBhbo0NTkyS5%0APAr9L8j/96+U/w3yCoCXW14B8HLLvwDd67nwZIEPdgAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Note"><span>This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care. 此选项允许直接访问主机硬件。因此，无法再迁移此类机器 - 请特别小心使用。The value </span><em><span>spice</span></em><span> can be used to add a usb redirection devices for spice. 值 </span><em><span>spice</span></em><span> 可用于为 spice 添加 usb 重定向设备。Either this or the </span><em><span>mapping</span></em><span> key must be set. 必须设置此键或</span><em><span>映射</span></em><span>键。mapping=</span><mapping-id><span> 映射=&lt;映射-id&gt;The ID of a cluster wide mapping. Either this or the default-key </span><em><span>host</span></em><span> must be set. 集群范围映射的 ID。必须设置此主机或默认键</span><em><span>主机</span></em><span>。usb3=</span><boolean><span> (</span><em><span>default =</span></em><span> 0) usb3=</span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）Specifies whether if given host option is a USB3 device or port. For modern guests (machine version &gt;= 7.1 and ostype l26 and windows &gt; 7), this flag is irrelevant (all devices are plugged into a xhci controller). 指定如果给定的主机选项是 USB3 设备还是端口。对于现代客户机 （计算机版本 &gt;= 7.1 和 ostype l26 和 Windows &gt; 7） ，此标志无关紧要 （所有设备都插入到 xhci 控制器） 。</span></p></li><li><p><span>vcpus: </span><integer><span> (1 - N) (</span><em><span>default =</span></em><span> 0) vcpus： </span><integer><span> （1 - N） （</span><em><span>默认值 =</span></em><span> 0）</span></p><p><span>Number of hotplugged vcpus. 热插拔的 vCPU 数量。</span></p></li><li><p><span>vga: [[type=]</span><enum><span>] [,clipboard=</span><vnc><span>] [,memory=</span><integer><span>] vga： [[type=]</span><enum><span>] [，clipboard=</span><vnc><span>] [，memory=</span><integer><span>]</span></p><p><span>Configure the VGA Hardware. If you want to use high resolution modes (&gt;= 1280x1024x16) you may need to increase the vga memory option. Since QEMU 2.9 the default VGA display type is </span><em><span>std</span></em><span> for all OS types besides some Windows versions (XP and older) which use </span><em><span>cirrus</span></em><span>. The </span><em><span>qxl</span></em><span> option enables the SPICE display server. For win* OS you can select how many independent displays you want, Linux guests can add displays them self. You can also run without any graphic card, using a serial device as terminal. 配置 VGA 硬件。如果要使用高分辨率模式 （&gt;= 1280x1024x16），则可能需要增加 vga 内存选项。从 QEMU 2.9 开始，除了一些使用 </span><em><span>cirrus</span></em><span> 的 Windows 版本（XP 及更早版本）外，所有操作系统类型的默认 VGA 显示类型都是 </span><em><span>std</span></em><span>。</span><em><span>qxl</span></em><span> 选项启用 SPICE 显示服务器。对于 win* 操作系统，您可以选择所需的独立显示器数量，Linux 客户可以自行添加显示器。您也可以在没有任何显卡的情况下运行，使用串行设备作为终端。clipboard=</span><vnc><span> 剪贴板=</span><vnc><span>Enable a specific clipboard. If not set, depending on the display type the SPICE one will be added. Migration with VNC clipboard is not yet supported! 启用特定剪贴板。如果未设置，根据显示类型，将添加 SPICE 一个。尚不支持使用 VNC 剪贴板进行迁移！memory=</span><integer><span> (4 - 512) 内存=</span><integer><span> （4 - 512）Sets the VGA memory (in MiB). Has no effect with serial display. 设置 VGA 内存（以 MiB 为单位）。对串行显示没有影响。type=&lt;cirrus | none | qxl | qxl2 | qxl3 | qxl4 | serial0 | serial1 | serial2 | serial3 | std | virtio | virtio-gl | vmware&gt; (</span><em><span>default =</span></em><span> std) type=&lt;cirrus | none | qxl | qxl2 | qxl3 | qxl4 | serial0 | serial1 | serial2 | serial3 | std | virtio | virtio-gl | vmware&gt;（</span><em><span>默认值 =</span></em><span> std）Select the VGA type. Using type </span><em><span>cirrus</span></em><span> is not recommended. 选择 VGA 类型。不建议使用</span><em><span>卷云</span></em><span>类型。</span></p></li><li><p><span>virtio[n]: [file=]</span><volume><span> [,aio=&lt;native|threads|io_uring&gt;] [,backup=&lt;1|0&gt;] [,bps=</span><bps><span>] [,bps_max_length=</span><seconds><span>] [,bps_rd=</span><bps><span>] [,bps_rd_max_length=</span><seconds><span>] [,bps_wr=</span><bps><span>] [,bps_wr_max_length=</span><seconds><span>] [,cache=</span><enum><span>] [,cyls=</span><integer><span>] [,detect_zeroes=&lt;1|0&gt;] [,discard=&lt;ignore|on&gt;] [,format=</span><enum><span>] [,heads=</span><integer><span>] [,iops=</span><iops><span>] [,iops_max=</span><iops><span>] [,iops_max_length=</span><seconds><span>] [,iops_rd=</span><iops><span>] [,iops_rd_max=</span><iops><span>] [,iops_rd_max_length=</span><seconds><span>] [,iops_wr=</span><iops><span>] [,iops_wr_max=</span><iops><span>] [,iops_wr_max_length=</span><seconds><span>] [,iothread=&lt;1|0&gt;] [,mbps=</span><mbps><span>] [,mbps_max=</span><mbps><span>] [,mbps_rd=</span><mbps><span>] [,mbps_rd_max=</span><mbps><span>] [,mbps_wr=</span><mbps><span>] [,mbps_wr_max=</span><mbps><span>] [,media=&lt;cdrom|disk&gt;] [,replicate=&lt;1|0&gt;] [,rerror=&lt;ignore|report|stop&gt;] [,ro=&lt;1|0&gt;] [,secs=</span><integer><span>] [,serial=</span><serial><span>] [,shared=&lt;1|0&gt;] [,size=</span><DiskSize><span>] [,snapshot=&lt;1|0&gt;] [,trans=&lt;none|lba|auto&gt;] [,werror=</span><enum><span>] virtio[n]： [file=] [，aio=] [，backup=&lt;1 |0&gt;] [，bps=] [，bps_max_length=] [，bps_rd=] [，bps_rd_max_length=] [，bps_wr=] [，bps_wr_max_length=] [，cache=] [，cyls=] [，detect_zeroes=&lt;1 |0&gt;] [，discard=] [，format=] [，heads=] [，iops=] [，iops_max=] [，iops_max_length=] [，iops_rd=] [，iops_rd_max=] [，iops_rd_max_length=] [，iops_wr=] [，iops_wr_max=] [，iops_wr_max_length=] [，iothread&lt;1 |0&gt;=] [，mbps=] [，mbps_max=] [，mbps_rd=] [，mbps_rd_max=] [，mbps_wr=] [，mbps_wr_max=] [，media=] [，replicate&lt;1 |0&gt;=] [，rerror=] [，ro=&lt;1 |0&gt;] [，secs=] [，serial=] [，shared=&lt;1 |0&gt;] [，size=] [，snapshot=&lt;1 |0&gt;] [，trans=] [，werror=]</span></p><p><span>Use volume as VIRTIO hard disk (n is 0 to 15). 使用卷作为 VIRTIO 硬盘（n 为 0 到 15）。aio=&lt;io_uring | native | threads&gt; aio=&lt;io_uring | 本机 | 线程&gt;AIO type to use. 要使用的 AIO 类型。backup=</span><boolean><span> 备份=</span><boolean><span>Whether the drive should be included when making backups. 进行备份时是否应包含驱动器。bps=</span><bps><span>Maximum r/w speed in bytes per second. 最大 r/w 速度（以字节/秒为单位）。bps_max_length=</span><seconds><span> bps_max_length=&lt;秒&gt;Maximum length of I/O bursts in seconds. I/O 突发的最大长度（以秒为单位）。bps_rd=</span><bps><span>Maximum read speed in bytes per second. 最大读取速度（以字节/秒为单位）。bps_rd_max_length=</span><seconds><span> bps_rd_max_length=&lt;秒&gt;Maximum length of read I/O bursts in seconds. 读取 I/O 突发的最大长度（以秒为单位）。bps_wr=</span><bps><span>Maximum write speed in bytes per second. 最大写入速度（以字节/秒为单位）。bps_wr_max_length=</span><seconds><span> bps_wr_max_length=&lt;秒&gt;Maximum length of write I/O bursts in seconds. 写入 I/O 突发的最大长度（以秒为单位）。cache=&lt;directsync | none | unsafe | writeback | writethrough&gt; cache=&lt;directsync | none | 不安全 | writeback | writethrough&gt;The drive’s cache mode 驱动器的缓存模式cyls=</span><integer><span>Force the drive’s physical geometry to have a specific cylinder count. 强制驱动器的物理几何形状具有特定的柱面计数。detect_zeroes=</span><boolean><span>Controls whether to detect and try to optimize writes of zeroes. 控制是否检测和尝试优化零的写入。discard=&lt;ignore | on&gt;Controls whether to pass discard/trim requests to the underlying storage. 控制是否将丢弃/修剪请求传递到底层存储。file=</span><volume><span> 文件=&lt;卷&gt;The drive’s backing volume. 驱动器的后备卷。format=&lt;cloop | cow | qcow | qcow2 | qed | raw | vmdk&gt;The drive’s backing file’s data format. 驱动器的备份文件的数据格式。heads=</span><integer><span>Force the drive’s physical geometry to have a specific head count. 强制驱动器的物理几何形状具有特定的磁头数。iops=</span><iops><span>Maximum r/w I/O in operations per second. 每秒操作中的最大 r/w I/O。iops_max=</span><iops><span>Maximum unthrottled r/w I/O pool in operations per second. 每秒操作中最大未受限制的 r/w I/O 池。iops_max_length=</span><seconds><span> iops_max_length=&lt;秒&gt;Maximum length of I/O bursts in seconds. I/O 突发的最大长度（以秒为单位）。iops_rd=</span><iops><span>Maximum read I/O in operations per second. 每秒操作中的最大读取 I/O。iops_rd_max=</span><iops><span>Maximum unthrottled read I/O pool in operations per second. 每秒操作中的最大不受限制的读取 I/O 池。iops_rd_max_length=</span><seconds><span> iops_rd_max_length=&lt;秒&gt;Maximum length of read I/O bursts in seconds. 读取 I/O 突发的最大长度（以秒为单位）。iops_wr=</span><iops><span>Maximum write I/O in operations per second. 每秒操作中的最大写入 I/O。iops_wr_max=</span><iops><span>Maximum unthrottled write I/O pool in operations per second. 每秒操作中的最大未限制写入 I/O 池。iops_wr_max_length=</span><seconds><span> iops_wr_max_length=&lt;秒&gt;Maximum length of write I/O bursts in seconds. 写入 I/O 突发的最大长度（以秒为单位）。iothread=</span><boolean><span>Whether to use iothreads for this drive 是否对此驱动器使用 iothreadsmbps=</span><mbps><span>Maximum r/w speed in megabytes per second. 最大 r/w 速度（以兆字节/秒为单位）。mbps_max=</span><mbps><span>Maximum unthrottled r/w pool in megabytes per second. 最大未限制的 r/w 池（以兆字节/秒为单位）。mbps_rd=</span><mbps><span>Maximum read speed in megabytes per second. 最大读取速度（以兆字节/秒为单位）。mbps_rd_max=</span><mbps><span>Maximum unthrottled read pool in megabytes per second. 最大未限制读取池（以兆字节/秒为单位）。mbps_wr=</span><mbps><span>Maximum write speed in megabytes per second. 最大写入速度（以兆字节/秒为单位）。mbps_wr_max=</span><mbps><span>Maximum unthrottled write pool in megabytes per second. 最大未限制写入池（以兆字节/秒为单位）。media=&lt;cdrom | disk&gt; (</span><em><span>default =</span></em><span> disk) media=&lt;cdrom | disk&gt;（</span><em><span>默认值 =</span></em><span> 磁盘）The drive’s media type. 驱动器的介质类型。replicate=</span><boolean><span> (</span><em><span>default =</span></em><span> 1) replicate=</span><boolean><span>（</span><em><span>默认值 =</span></em><span> 1）Whether the drive should considered for replication jobs. 是否应考虑将驱动器用于复制作业。rerror=&lt;ignore | report | stop&gt; rerror=&lt;ignore | 报告 | stop&gt;Read error action. 读取错误操作。ro=</span><boolean><span>Whether the drive is read-only. 驱动器是否为只读。secs=</span><integer><span> 秒=</span><integer><span>Force the drive’s physical geometry to have a specific sector count. 强制驱动器的物理几何图形具有特定的扇区计数。serial=</span><serial><span> 序列号=&lt;序列号&gt;The drive’s reported serial number, url-encoded, up to 20 bytes long. 驱动器报告的序列号，URL 编码，最长 20 个字节。shared=</span><boolean><span> (</span><em><span>default =</span></em><span> 0) shared=</span><boolean><span>（</span><em><span>默认值 =</span></em><span> 0）Mark this locally-managed volume as available on all nodes. 将此本地管理的卷标记为在所有节点上都可用。</span><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAMVUlEQVRogdWZeXDVVZbHP7/f27JB%0AwtJIiCERRFlbx5FuHRrRBgtBsRIwCCOrFmGmiDBjYVNlQlgiQjU6IjI4xLJxGf5QGp0Cbaftsu3R%0Ahu6aYXqgLZoWEsjyyDP7S972e7/l3vnj5cW3Ji9M/zOn6lRS997fvd/vueece+59ipSS/89iv5mP%0AZEQQQsS23RQARVEAUFUVRVFQog0ZyogJSClld3c327Ztw7IsLMuKto90KgBsNhtVVVXMnj2bvLw8%0A7Ha7HBEJKWXGKoSQXV1dcsuWLfLSpUsyKkKIIdWyrLTqdrvlU089Jc+cOSM9Ho8Mh8NSCCEzxTRi%0A8JWVlbKtre0vAt6yLGmapmxtbZXr1q2TZ86ckW1tbSMikTH4GzduyKqqqkHwsSA1TZOh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Nr75K6rtZiXr49KVLKf/4Y4QQ6LqeBP6RRx6hvLycadOmMXPmTEpKSsjN%0Azf3uZS6WRHV1NadOnUpaTEpJa2sr5zZupOkmSaQqk2csWcLyTz4BQNO0uL7GxkbWr1+fErzNZlMG%0Aw1lVVSUvL4+SkhL27dvH8uXL8Xg8ceABiouLue+ttyieN2+IK2Z6TRx/5+LFacE3NDRQWVmZFjwk%0AnAOxJF566SW2bNnChQsXkmKipKSEB959l9vmzcvo1pZOpz/8ME98+mla8Bs2bGDZsmVpwUOa5/VE%0Ad0oXE319fXxWXs43Z88m9Q0n03/0I1YPJIRE8OfOnWPHjh2UlZUNCT4tgUQSO3fupKqqigceeGCw%0AP/a7VM8emUg0VcbK+fPn2bp1KytWrBgW/JAEEknU1NTw7LPPMn/+/GFBZQI8lZw/f57nnnuO5cuX%0AM2XKlGHBD0sgkURdXR2PP/44FRUVNwV+qP7Tp09z8ODBjNxmRAQSSRw4cIBly5axdOnSvwh4RVH4%0A4osv2L9/P2VlZRlbfkQEEkls376djo4OQqHE83bk4nK5EEKwZs0aSktLRwR+RATgOxItLS1cu3aN%0Avr6+wTfK/4tEfzeeMmUKkydPzhg8jJAAREgEg0H6+vrQNC2pFL8ZUVWVrKws8vPzycnJQVXVjH/s%0A/F/lgJiyQFHragAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Warning"><span>This option does not share the volume automatically, it assumes it is shared already! 此选项不会自动共享卷，而是假定它已经共享！size=</span><DiskSize><span> 大小=</span><iskSize><span>Disk size. This is purely informational and has no effect. 磁盘大小。这纯粹是信息性的，没有任何效果。snapshot=</span><boolean><span> 快照=</span><boolean><span>Controls qemu’s snapshot mode feature. If activated, changes made to the disk are temporary and will be discarded when the VM is shutdown. 控制 qemu 的快照模式功能。如果激活，对磁盘所做的更改是临时的，并且在 VM 关闭时将被丢弃。trans=&lt;auto | lba | none&gt;Force disk geometry bios translation mode. 强制磁盘几何 bios 转换模式。werror=&lt;enospc | ignore | report | stop&gt; werror=&lt;enospc | 忽略 | 报告 | stop&gt;Write error action. 写入错误操作。</span></p></li><li><p><span>vmgenid: </span><UUID><span> (</span><em><span>default =</span></em><span> 1 (autogenerated)) vmgens： </span><UUID><span>（</span><em><span>默认值 =</span></em><span> 1（自动生成））</span></p><p><span>The VM generation ID (vmgenid) device exposes a 128-bit integer value identifier to the guest OS. This allows to notify the guest operating system when the virtual machine is executed with a different configuration (e.g. snapshot execution or creation from a template). The guest operating system notices the change, and is then able to react as appropriate by marking its copies of distributed databases as dirty, re-initializing its random number generator, etc. Note that auto-creation only works when done through API/CLI create or update methods, but not when manually editing the config file. VM 生成 ID （vmgenid） 设备向客户机操作系统公开 128 位整数值标识符。这允许在使用不同的配置（例如，快照执行或从模板创建）执行虚拟机时通知客户机操作系统。客户机操作系统注意到了这一变化，然后能够根据适当的方式做出反应，将其分布式数据库的副本标记为脏的副本，重新初始化其随机数生成器等。请注意，自动创建仅在通过 API/CLI 创建或更新方法完成时有效，但在手动编辑配置文件时则无效。</span></p></li><li><p><span>vmstatestorage: </span><storage ID><span> vmstatestorage： &lt;存储 ID&gt;</span></p><p><span>Default storage for VM state volumes/files. VM 状态卷/文件的默认存储。</span></p></li><li><p><span>watchdog: [[model=]&lt;i6300esb|ib700&gt;] [,action=</span><enum><span>] 看门狗：[[model=]&lt;i6300esb|ib700&gt;] [，action=</span><enum><span>]</span></p><p><span>Create a virtual hardware watchdog device. Once enabled (by a guest action), the watchdog must be periodically polled by an agent inside the guest or else the watchdog will reset the guest (or execute the respective action specified) 创建虚拟硬件看门狗设备。一旦启用（通过客户机操作），客户机内的代理必须定期轮询看门狗，否则看门狗将重置客户机（或执行指定的相应操作）action=&lt;debug | none | pause | poweroff | reset | shutdown&gt; action=&lt;debug | none | 暂停 | poweroff | reset | shutdown&gt;The action to perform if after activation the guest fails to poll the watchdog in time. 如果激活后客户机未能及时轮询看门狗，则要执行的操作。model=&lt;i6300esb | ib700&gt; (</span><em><span>default =</span></em><span> i6300esb) model=&lt;i6300esb | ib700&gt; （</span><em><span>默认值 =</span></em><span> i6300esb）Watchdog type to emulate. 要模拟的看门狗类型。</span></p></li></ul><h2 id='locks-锁'><span>Locks 锁</span></h2><p><span>Online migrations, snapshots and backups (vzdump) set a lock to prevent incompatible concurrent actions on the affected VMs. Sometimes you need to remove such a lock manually (for example after a power failure).</span>
<span>联机迁移、快照和备份 （vzdump） 设置锁定，以防止在受影响的 VM 上执行不兼容的并发操作。有时您需要手动移除此类锁（例如，在电源故障后）。</span></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang=""><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 11px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"># qm unlock &lt;vmid&gt;</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><figure class='table-figure'><table><thead><tr><th><img src="data:image/png;base64,%0AiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAKdUlEQVRoge1Ze1AV1x3+zt279wEi%0ADWCYGzRVktqa1MEmmtbWR22ncXxUrTDWV/5IqG2wUAUfmUwSkk6V+EAJCEQC6figwZBqZtRxqukf%0AtebRZBpFG1S0hiRErwiaKK977+6eX//YPXt37+UiIJlMZnpmdnb33PP4vt97z2VEhG9yc3zdAO60%0A/Z/A192+8QScX8Wifr+fWltbzffU1FT4fD72Vew15ASampqovr4eBw8eNPvGjRuHzMxMmj9//tCT%0AIKIhu958801yuVwEoNdr48aNNJT7EdHQEdi/fz/JshwTvLiKioqGlMSQLFJfX0+MMRvQsWNSqXLz%0AH2jez78fRWLTpk1DRuKOF6irqyOn02kDOP8XGdTz+VFSP91Hatu79NRvZ0SR2LJly5CQuKPJtbW1%0AJEmSDdivHp1AwctHSblYSsqFElLOF5PavIvWZU+LIrF169Y7JjHoibt3744CnzXrIQpeOUbKhVJS%0AmkpIPV9MyrnNpJwtIuVSNa15/MdRJLZt23ZHJBjRwIu5N954gxYvXgzOudm3aO5E1L5SBNZ1Hoxr%0AINLAyH6HJxVP/WkXtu9+37ZeSUkJVq9ePagQO+BMXFNTEwV+ybxHsPeVIjg6zwOkgSWNhuOuUUBC%0AKhxJY0AggDSgpwWbn1mO1csftq1ZUFCA0tLSQZXFA0pkVVVVlJOTA6vWsmY9hF07N0AS4OU48LgR%0AWLO+FPFxboxMS8G5hlPYmPMI4jwM1P0Jtj67DJyrKHvtNADdjPPz8+FwOCgvL29gmuivrVVUVESF%0AyqxZD1PoyjFSL+7QHbapmJTml+n9EzVRtl676ZekNKwl5VQ+KSfzKHR2E+UutodYxhiVl5cPyCf6%0AZUJlZWWUm5trk/wTi6bgtVdf1M2Gq2DEwUgDNBWhUDBqjfSRwwGoIOEP3c3Y/uxirFw0zibMvLw8%0AVFZW9tucbkugo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E4nZFmGLMtwu93wer1wuVy2ECpJko2I%0AiTNWJrZGI+HEwi6FisUVCAQQCASwZ88eVFZW9lk9JicnY/369fD5fPB4PCbo+Ph4k4TH44HL5YLX%0A64XX6zXH9EKE9aUBRkTEGLNJP1Kd4nI4HMjOzkZ8fDyKi4ttJ3eiJSYmYu3atRg1apQJzuv1wuPx%0AwOPxwOFwmEBFHnA6nXC5XGYSiywlbns2SnoDANN0hMNZnS0UCpkaOnPmDN566y20tLSY2ktLS8OM%0AGTOQkpICt9uNuLg4M2EJ8CJZSZJkZmFBwkrAWpH2+3BXEBEkRIhTVdVMOCL5qKqKy5cvQ1EUaJoG%0AVVWRnKx/Jlpt3eVy2QCKu9C68AFr9o0spwd0Oh1ZYggCIlNaiQktiXdhZgKQABcp3ci7LMtM7B0J%0AfsAErJoAYItG1mdr+hfvVlACtHDIXkploYXbHvQOikDEe6/ZmjFmAhf9ZvJxOk2Qol88W4kYz32S%0AGNQfHLG+TyMTkAVEr88xQfVnkBg7GAKixSIykDYQsL21/wFkW/B5QqT9lwAAAABJRU5ErkJggg==" referrerpolicy="no-referrer" alt="Caution"></th><th><span>Only do that if you are sure the action which set the lock is no longer running. 仅当您确定设置锁的操作不再运行时才这样做。</span></th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></figure><h2 id='files-文件'><span>Files 文件</span></h2><ul><li><p><span>/etc/pve/qemu-server/</span><VMID><span>.conf</span></p><p><span>Configuration file for the VM </span><em><VMID></em><span>. VM </span><em><VMID></em><span> 的配置文件。</span></p></li></ul><h2 id='copyright-and-disclaimer-版权及免责声明'><span>Copyright and Disclaimer 版权及免责声明</span></h2><p><span>Copyright © 2007-2022 Proxmox Server Solutions GmbH</span>
<span>版权所有 © 2007-2022 Proxmox Server Solutions GmbH</span></p><p><span>This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.</span>
<span>该程序是自由软件：您可以根据自由软件基金会发布的 GNU Affero 通用公共许可证的条款重新分发和/或修改它，该许可证的版本 3 或（由您选择）任何更高版本。</span></p><p><span>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.</span>
<span>分发该程序是希望它有用，但没有任何保证;甚至没有对适销性或特定用途适用性的默示保证。有关更多详细信息，请参阅 GNU Affero 通用公共许可证。</span></p><p><span>You should have received a copy of the GNU Affero General Public License along with this program. If not, see </span><a href='https://www.gnu.org/licenses/' target='_blank' class='url'>https://www.gnu.org/licenses/</a>
<span>您应该已经收到了 GNU Affero 通用公共许可证的副本以及此程序。如果没有，请参阅 </span><a href='https://www.gnu.org/licenses/' target='_blank' class='url'>https://www.gnu.org/licenses/</a></p><hr /><p><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnoteref_1'><span>1</span></a><span>. See this benchmark on the KVM wiki </span><a href='https://www.linux-kvm.org/page/Using_VirtIO_NIC' target='_blank' class='url'>https://www.linux-kvm.org/page/Using_VirtIO_NIC</a>
<a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnoteref_1'><span>1</span></a><span>. 在 KVM wiki 上查看此基准测试 </span><a href='https://www.linux-kvm.org/page/Using_VirtIO_NIC' target='_blank' class='url'>https://www.linux-kvm.org/page/Using_VirtIO_NIC</a></p><p><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnoteref_2'><span>2</span></a><span>. See this benchmark for details </span><a href='https://events.static.linuxfound.org/sites/events/files/slides/CloudOpen2013_Khoa_Huynh_v3.pdf' target='_blank' class='url'>https://events.static.linuxfound.org/sites/events/files/slides/CloudOpen2013_Khoa_Huynh_v3.pdf</a>
<a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnoteref_2'><span>2</span></a><span>. 有关详细信息，请参阅此基准 </span><a href='https://events.static.linuxfound.org/sites/events/files/slides/CloudOpen2013_Khoa_Huynh_v3.pdf' target='_blank' class='url'>https://events.static.linuxfound.org/sites/events/files/slides/CloudOpen2013_Khoa_Huynh_v3.pdf</a></p><p><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnoteref_3'><span>3</span></a><span>. TRIM, UNMAP, and discard </span><a href='https://en.wikipedia.org/wiki/Trim_(computing)'><span>https://en.wikipedia.org/wiki/Trim_%28computing%29</span></a>
<a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnoteref_3'><span>3</span></a><span>. 修剪、取消映射和丢弃 </span><a href='https://en.wikipedia.org/wiki/Trim_(computing)'><span>https://en.wikipedia.org/wiki/Trim_%28computing%29</span></a></p><p><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnoteref_4'><span>4</span></a><span>. Meltdown Attack </span><a href='https://meltdownattack.com/' target='_blank' class='url'>https://meltdownattack.com/</a>
<a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnoteref_4'><span>4</span></a><span>. Meltdown 攻击 </span><a href='https://meltdownattack.com/' target='_blank' class='url'>https://meltdownattack.com/</a></p><p><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnoteref_5'><span>5</span></a><span>. spectre-meltdown-checker </span><a href='https://meltdown.ovh/' target='_blank' class='url'>https://meltdown.ovh/</a></p><p><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnoteref_6'><span>6</span></a><span>. PCID is now a critical performance/security feature on x86 </span><a href='https://groups.google.com/forum/m/#!topic/mechanical-sympathy/L9mHTbeQLNU' target='_blank' class='url'>https://groups.google.com/forum/m/#!topic/mechanical-sympathy/L9mHTbeQLNU</a>
<a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnoteref_6'><span>6</span></a><span>. PCID 现在是 x86 </span><a href='https://groups.google.com/forum/m/#!topic/mechanical-sympathy/L9mHTbeQLNU' target='_blank' class='url'>https://groups.google.com/forum/m/#!topic/mechanical-sympathy/L9mHTbeQLNU</a><span> 上的关键性能/安全特性</span></p><p><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnoteref_7'><span>7</span></a><span>. </span><a href='https://en.wikipedia.org/wiki/Non-uniform_memory_access' target='_blank' class='url'>https://en.wikipedia.org/wiki/Non-uniform_memory_access</a></p><p><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnoteref_8'><span>8</span></a><span>. if the command numactl --hardware | grep available returns more than one node, then your host system has a NUMA architecture</span>
<a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnoteref_8'><span>8</span></a><span>. 如果命令 numactl --hardware | grep available 返回多个节点，则您的主机系统具有 NUMA 体系结构</span></p><p><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnoteref_9'><span>9</span></a><span>. A good explanation of the inner workings of the balloon driver can be found here </span><a href='https://rwmj.wordpress.com/2010/07/17/virtio-balloon/' target='_blank' class='url'>https://rwmj.wordpress.com/2010/07/17/virtio-balloon/</a>
<a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnoteref_9'><span>9</span></a><span>. 关于气球驱动器内部工作的解释可以在这里找到 </span><a href='https://rwmj.wordpress.com/2010/07/17/virtio-balloon/' target='_blank' class='url'>https://rwmj.wordpress.com/2010/07/17/virtio-balloon/</a></p><p><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnoteref_10'><span>10</span></a><span>. </span><a href='https://www.kraxel.org/blog/2014/10/qemu-using-cirrus-considered-harmful/' target='_blank' class='url'>https://www.kraxel.org/blog/2014/10/qemu-using-cirrus-considered-harmful/</a><span> qemu: using cirrus considered harmful</span>
<a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnoteref_10'><span>10</span></a><span>. </span><a href='https://www.kraxel.org/blog/2014/10/qemu-using-cirrus-considered-harmful/' target='_blank' class='url'>https://www.kraxel.org/blog/2014/10/qemu-using-cirrus-considered-harmful/</a><span> QEMU：使用被认为有害的卷云</span></p><p><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnoteref_11'><span>11</span></a><span>. See the OVMF Project </span><a href='https://github.com/tianocore/tianocore.github.io/wiki/OVMF' target='_blank' class='url'>https://github.com/tianocore/tianocore.github.io/wiki/OVMF</a>
<a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnoteref_11'><span>11</span></a><span>. 请参阅 OVMF 项目 </span><a href='https://github.com/tianocore/tianocore.github.io/wiki/OVMF' target='_blank' class='url'>https://github.com/tianocore/tianocore.github.io/wiki/OVMF</a></p><p><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnoteref_12'><span>12</span></a><span>. Alex Williamson has a good blog entry about this </span><a href='https://vfio.blogspot.co.at/2014/08/primary-graphics-assignment-without-vga.html' target='_blank' class='url'>https://vfio.blogspot.co.at/2014/08/primary-graphics-assignment-without-vga.html</a>
<a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnoteref_12'><span>12</span></a><span>. 亚历克斯·威廉姆森 （Alex Williamson） 有一篇关于这个 </span><a href='https://vfio.blogspot.co.at/2014/08/primary-graphics-assignment-without-vga.html' target='_blank' class='url'>https://vfio.blogspot.co.at/2014/08/primary-graphics-assignment-without-vga.html</a><span> 的好博客文章</span></p><p><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnoteref_13'><span>13</span></a><span>. Looking Glass: </span><a href='https://looking-glass.io/' target='_blank' class='url'>https://looking-glass.io/</a>
<a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnoteref_13'><span>13</span></a><span>. 镜子：</span><a href='https://looking-glass.io/' target='_blank' class='url'>https://looking-glass.io/</a></p><p><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnoteref_14'><span>14</span></a><span>. Official </span><em><span>vmgenid</span></em><span> Specification </span><a href='https://docs.microsoft.com/en-us/windows/desktop/hyperv_v2/virtual-machine-generation-identifier' target='_blank' class='url'>https://docs.microsoft.com/en-us/windows/desktop/hyperv_v2/virtual-machine-generation-identifier</a>
<a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnoteref_14'><span>14</span></a><span>. </span><em><span>官方 vmgenid</span></em><span> 规格 </span><a href='https://docs.microsoft.com/en-us/windows/desktop/hyperv_v2/virtual-machine-generation-identifier' target='_blank' class='url'>https://docs.microsoft.com/en-us/windows/desktop/hyperv_v2/virtual-machine-generation-identifier</a></p><p><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnoteref_15'><span>15</span></a><span>. Online GUID generator </span><a href='http://guid.one/' target='_blank' class='url'>http://guid.one/</a>
<a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnoteref_15'><span>15</span></a><span>. 在线 GUID 生成器 </span><a href='http://guid.one/' target='_blank' class='url'>http://guid.one/</a></p><p><a href='https://pve.proxmox.com/pve-docs/qm.1.html#_footnoteref_16'><span>16</span></a><span>. </span><a href='https://docs.microsoft.com/en-us/windows-server/identity/ad-ds/get-started/virtual-dc/virtualized-domain-controller-architecture' target='_blank' class='url'>https://docs.microsoft.com/en-us/windows-server/identity/ad-ds/get-started/virtual-dc/virtualized-domain-controller-architecture</a></p><p><span>Version 8.2.3 版本 8.2.3</span>
<span>Last updated Wed Jul 31 16:58:41 CEST 2024</span>
<span>最后更新 星期三 Jul 31 16：58：41 CEST 2024</span></p></div></div>
</body>
</html>